Search Postgresql Archives

Re: Automate copy - Postgres 9.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2016-06-09 13:15 GMT+12:00 John R Pierce <pierce@xxxxxxxxxxxx>:
On 6/8/2016 5:46 PM, Patrick B wrote:
Single id as you show, a range of numbers or an array of numbers?

select function(21);

Where 21 = Number of ids

how do you get the specific ID's from "21" ?



21 is the number of IDS that I wanna perform that COPY command....



twenty one times this sql:

COPY  
COPY 
(SELECT * FROM backup_table WHERE id = 1112 AND status = 1) 
TO '/var/lib/pgsql/1112.sql';
COPY 
(SELECT * FROM backup_table WHERE id = 1113 AND status = 1) 
TO '/var/lib/pgsql/1113.sql';

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux