Strategy for Primary Key Generation When Populating Table - Mailing list pgsql-general

From Rich Shepard
Subject Strategy for Primary Key Generation When Populating Table
Date
Msg-id alpine.LNX.2.00.1202090843280.5256@salmo.appl-ecosys.com
Whole thread Raw
Responses Re: Strategy for Primary Key Generation When Populating Table  (Merlin Moncure <mmoncure@gmail.com>)
Re: Strategy for Primary Key Generation When Populating Table  (Andy Colson <andy@squeakycode.net>)
Re: Strategy for Primary Key Generation When Populating Table  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
   I have a lot of data currently in .pdf files. I can extract the relevant
data to plain text and format it to create a large text file of "INSERT INTO
..." rows. I need a unique ID for each row and there are no columns that
would make a natural key so the serial data type would be appropriate.

   When I prepare the text file I can start each row with the delimiter (',')
to indicate there's a table column preceding. If I define the primary key
as serial type on that first position in the file, will postgres
automagically fill it in as each row is read into the table?

   If not, or if there's a better way of approaching this task, please clue
me in to that.

TIA,

Rich



pgsql-general by date:

Previous
From: Chris Angelico
Date:
Subject: Re: Warning: you don't own a lock of type ExclusiveLock
Next
From: Merlin Moncure
Date:
Subject: Re: Strategy for Primary Key Generation When Populating Table