Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Peter J. Holzer
On 2022-08-02 13:08:41 -0600, Rob Sargent wrote: > If you can get outside sql, the bulk copy facilities (CopyManager in > java) is blindingly fast for me. > > > ?? > > > I meant using tools other than sql (and psql).   I have java code using > org.postgresql.copy package I

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Rob Sargent
Logical replication might be another option. Although I am not sure if that is even possible inside the samme database. I know it's tricky inside the same server (between different databases) If you can get outside sql, the bulk copy facilities (CopyManager in java) is blindingly fast for m

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Ron
On 8/2/22 13:59, Rob Sargent wrote: On 8/2/22 12:51, Thomas Kellerer wrote: Ron schrieb am 02.08.2022 um 20:37: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are: INSERT INTO table_a SELECT * FROM table_b; and

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Ron
On 8/2/22 13:51, Thomas Kellerer wrote: Ron schrieb am 02.08.2022 um 20:37: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are: INSERT INTO table_a SELECT * FROM table_b; and \COPY table_a TO '/tmp/table_a.tsv'

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Rob Sargent
On 8/2/22 12:51, Thomas Kellerer wrote: Ron schrieb am 02.08.2022 um 20:37: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are: INSERT INTO table_a SELECT * FROM table_b; and \COPY table_a TO '/tmp/table_a.tsv'

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Ron
On 8/2/22 13:41, Adrian Klaver wrote: On 8/2/22 11:37 AM, Ron wrote: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are: INSERT INTO table_a SELECT * FROM table_b; Argh, I got the tables backwards.  Should be: INS

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Thomas Kellerer
Ron schrieb am 02.08.2022 um 20:37: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are:     INSERT INTO table_a SELECT * FROM table_b; and     \COPY table_a TO '/tmp/table_a.tsv' WITH (FORMAT BINARY);     \COPY table_b

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Ron
On 8/2/22 13:41, Rob Sargent wrote: On 8/2/22 12:37, Ron wrote: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are:     INSERT INTO table_a SELECT * FROM table_b; and     \COPY table_a TO '/tmp/table_a.tsv' WITH (FORMAT B

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Adrian Klaver
On 8/2/22 11:37 AM, Ron wrote: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are:     INSERT INTO table_a SELECT * FROM table_b; and     \COPY table_a TO '/tmp/table_a.tsv' WITH (FORMAT BINARY);     \COPY table_b FROM

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Rob Sargent
On 8/2/22 12:37, Ron wrote: AWS RDS Postgresql 12.10 There are no indices or constraints (except for NOT NULL) on table_a. The two ways that I know are:     INSERT INTO table_a SELECT * FROM table_b; and     \COPY table_a TO '/tmp/table_a.tsv' WITH (FORMAT BINARY);     \COPY table_b FROM '/tmp/