Steve Wampler
2014-10-16 16:33:02 UTC
Hi,
This is with Postgresql 9.3.5.
I'm looking at using a COPY command (via jdbc) to do bulk inserts into a table that
includes a BIGSERIAL column. Is there a way to mark the data in that
column so it gets assigned a new value on entry - akin to the use of 'default'
in an INSERT? Some of the rows have values for the serial column, others
don't.
Or is the only way to use COPY for this task:
COPY table_name (columnnameA, columnnameB, columnnameD) FROM source;
where the serial column name is omitted? This wouldn't preserve the values
for the serial column on rows that have one already.
Thanks!
Steve
--
Steve Wampler -- ***@noao.edu
The gods that smiled on your birth are now laughing out loud.
--
This mail was scanned by a trial version of BitDefender
For more information please visit http://www.bitdefender.com/
This is with Postgresql 9.3.5.
I'm looking at using a COPY command (via jdbc) to do bulk inserts into a table that
includes a BIGSERIAL column. Is there a way to mark the data in that
column so it gets assigned a new value on entry - akin to the use of 'default'
in an INSERT? Some of the rows have values for the serial column, others
don't.
Or is the only way to use COPY for this task:
COPY table_name (columnnameA, columnnameB, columnnameD) FROM source;
where the serial column name is omitted? This wouldn't preserve the values
for the serial column on rows that have one already.
Thanks!
Steve
--
Steve Wampler -- ***@noao.edu
The gods that smiled on your birth are now laughing out loud.
--
This mail was scanned by a trial version of BitDefender
For more information please visit http://www.bitdefender.com/
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general