Re: [INTERFACES] copy command & null datetime
От | Brett W. McCoy |
---|---|
Тема | Re: [INTERFACES] copy command & null datetime |
Дата | |
Msg-id | Pine.LNX.4.04.9903080043450.10058-100000@dragosani.lan2wan.com обсуждение исходный текст |
Ответ на | copy command & null datetime ("Ken J. Wright" <ken@ori-ind.com>) |
Список | pgsql-interfaces |
On Sun, 7 Mar 1999, Ken J. Wright wrote: > The following example will cause COPY to fail on input: > > xxx|yyy|zzz||aaa|bbb| > > where the empty field in between zzz & aaa is of type datetime (don't know > about other types). I know a \N will fix this, but interpreting an empty > import field as NULL would certainly beef up COPY as other database systems > don't output the \N which is unique to PostgreSQL. Wish list item? Yes, I discovered this little issue the other day. What is this \N option, though? I have some 900000+ records out of a 2.1 million row table that have NULL date fields. I ended up sticking in a dummy date (of like 1901) for those, because I knew that valid dates stopped at a particular lower cutoff date of around 1968, then ignore the earlier date altogether. Brett W. McCoy http://www.lan2wan.com/~bmccoy/ ----------------------------------------------------------------------- A baby is God's opinion that the world should go on. -- Carl Sandburg -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GAT dpu s:-- a C++++ UL++++$ P+ L+++ E W++ N+ o K- w--- O@ M@ !V PS+++ PE Y+ PGP- t++ 5- X+ R+@ tv b+++ DI+++ D+ G++ e>++ h+(---) r++ y++++ ------END GEEK CODE BLOCK------
В списке pgsql-interfaces по дате отправления: