From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: importing db as text files |
Date: | 2003-08-14 14:01:55 |
Message-ID: | 20030814140155.GF27870@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 14, 2003 at 00:50:27 -0700,
"Gregory S. Williamson" <gsw(at)globexplorer(dot)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 ? [does an 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, just no 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Nagy Karoly | 2003-08-14 14:03:13 | Manage PostgreSQL Connections |
Previous Message | Bruno Wolff III | 2003-08-14 13:57:25 | Re: importing db as text files |