Re: importing db as text files
От | Bruno Wolff III |
---|---|
Тема | Re: importing db as text files |
Дата | |
Msg-id | 20030814140155.GF27870@wolff.to обсуждение исходный текст |
Ответ на | Re: importing db as text files ("Gregory S. Williamson" <gsw@globexplorer.com>) |
Список | pgsql-general |
On Thu, Aug 14, 2003 at 00:50:27 -0700, "Gregory S. Williamson" <gsw@globexplorer.com> wrote: > > Two issues raised (other than my atrocious coding) > > a) if defaults for a column are defined and copy is given a value of <> (implicit NULL) why not use the default ? [doesan explicit \n work -- didn't try, I have to confess] Because empty strings are valid data and you can't go assuming they are null, since you would then need a different string to represent the empty string. > b) more generally, if copy finds a column that allows null and the data is a null (not explicitly defined as such, justno data) isn't that value valid, e.g. a NULL value ? It might be bad data. The copy statement provides a way to define a string that represents the null string. It would probably be reasonable to add a way to specify a string to be replaced by the default value.
В списке pgsql-general по дате отправления: