Re: Process for populating tables in new database

2018-12-01 Thread Rich Shepard
On Sat, 1 Dec 2018, Adrian Klaver wrote: Forgot to add that if you pre-assign the keys to the serial field you will need to advance the sequence to a value past the last key value to avoid a duplicate key error when you let the sequence assign numbers. Adrian, Got it, thanks. Carpe weekend

Re: Process for populating tables in new database [RESOLVED]

2018-12-01 Thread Rich Shepard
On Sat, 1 Dec 2018, Adrian Klaver wrote: If you don't supply the key it will be generated as the default for the PK column is a sequence. Thanks, Adrian. I thought this to be the case and did not find confirmation in the manual (perhaps I just missed seeing it.) So are the tables you are I

Re: Process for populating tables in new database

2018-12-01 Thread Adrian Klaver
On 12/1/18 6:09 AM, Rich Shepard wrote: I have a new database with five tables, and text files with data to populate the tables using the insert command. 1. Each table has a sequential primary key. Should I manually add keys to each insert row or will postgres generate it automatically? Example

Re: Process for populating tables in new database

2018-12-01 Thread Adrian Klaver
On 12/1/18 6:09 AM, Rich Shepard wrote: I have a new database with five tables, and text files with data to populate the tables using the insert command. 1. Each table has a sequential primary key. Should I manually add keys to each insert row or will postgres generate it automatically? Example

Process for populating tables in new database

2018-12-01 Thread Rich Shepard
I have a new database with five tables, and text files with data to populate the tables using the insert command. 1. Each table has a sequential primary key. Should I manually add keys to each insert row or will postgres generate it automatically? Example, for the companies table: org_id| in