I want to load data via public api. Data comes in chunks, so the loop is needed to do the job. The simplest option is writing the script like
FOR counter IN 1..5 LOOP
copy weather_json FROM PROG...
DigitalOcean Managed PostgreSQL Database