From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Boes <jboes(at)nexcerpt(dot)com> |
Cc: | Postgres-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: COPY with default values? |
Date: | 2001-05-25 14:33:41 |
Message-ID: | 5108.990801221@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general |
Jeff Boes <jboes(at)nexcerpt(dot)com> writes:
> Now I would like to initialize this table with a COPY statement, but
> without supplying values for the primary key.
COPY does not deal with insertion of default values. Sorry.
One rather klugy answer is to COPY to a temp table that has only the
columns you want to supply, and then INSERT ... SELECT into the main
table. Might be faster if there are enough rows involved.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Kelly | 2001-05-25 15:03:46 | RE: DATE_PART() BUG? We have an SQL statement that is giving wro ng output. |
Previous Message | Jeff Boes | 2001-05-25 14:06:37 | COPY with default values? |
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Chittenden | 2001-05-25 14:56:28 | Re: Username with a hyphen character (grant failing?) |
Previous Message | Alla | 2001-05-25 14:32:47 | Re: Return cursor |