Re: COPY with default values?
От | Len Morgan |
---|---|
Тема | Re: COPY with default values? |
Дата | |
Msg-id | 006601c0e52f$57cdc2a0$0908a8c0@H233.bstx.cc обсуждение исходный текст |
Ответ на | COPY with default values? (Jeff Boes <jboes@nexcerpt.com>) |
Список | pgsql-general |
You are correct and if you did your bulk insert with INSERT commands, it will work just fine. The difference is the COPY command which AFAIK was/is intended for backup and restore use. len morgan -----Original Message----- From: Jeff Boes <jboes@nexcerpt.com> To: Postgres-general <pgsql-general@postgresql.org> Date: Friday, May 25, 2001 10:25 AM Subject: Re: [GENERAL] COPY with default values? >On Fri, 25 May 2001 10:33:41 -0400 >Tom Lane <tgl@sss.pgh.pa.us> wrote: > >> COPY does not deal with insertion of default values. Sorry. > >This seems odd to me, especially since Pgsql treats > >INSERT INTO keywords (key_id, key_text) VALUES (null, 'foo'); > >differently than > >INSERT INTO keywords (key_text) VALUES ('foo'); > >It's been a while, but I'm pretty sure Oracle will do the same thing for >each of these inserts, namely apply a default value when a null is >detected. > >But thanks for the help! > >-- >Jeff Boes vox 616.226.9550 >Database Engineer fax 616.349.9076 >Nexcerpt, Inc. jboes@nexcerpt.com > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
В списке pgsql-general по дате отправления: