Search Postgresql Archives

Re: COPY FROM - how to identify results?

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

 



On Tue, 03 Apr 2007 12:45:54 -0400, Jaime Silvela <JSilvela@xxxxxxxx> wrote:
> I'd like to be able to do something like
> COPY mytable (field-1, ..  field-n, id = my_id) FROM file;

How do you get my_id?  Can you get it in a trigger?  Triggers still fire
with copy so if you can get a trigger to fill in the id column you can
copy with just the field names.

klint.

+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg@xxxxxxxxxxxxxx           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+


[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