| From: | David Wheeler <david(at)wheeler(dot)net> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Cc: | dbi-users(at)perl(dot)org | 
| Subject: | NULL vs. Empty String | 
| Date: | 2001-03-14 06:26:21 | 
| Message-ID: | Pine.LNX.4.21.0103132221090.10421-100000@theory | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Hi All,
Apologies for cross-posting.
I've ported a mod_perl application from Oracle to PosgreSQL, but have run
into a difference that's significant for web work. When I get a form field
submitted, if it's empty, mod_perl assumes it to be an empty string ('').
When I inserted empty strings into Oracle tables, Oracle assumed they were
NULL and inserted them as such. Postgres, OTOH, seems to insert it as an
empty string instead. While I realize that the Posgres interpretation is
perhaps the more precise of the two, it was a feature of Oracle that I
rather liked.
Is there a way to get Posgres to assume that a '' insert should be a NULL
insert? And if not, does anyone know of a way to get mod_perl to make that
assumption instead?
TIA,
David
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Sawtell | 2001-03-14 06:31:38 | Re: Is v7.1 stable enough? | 
| Previous Message | Tom Lane | 2001-03-14 06:16:41 | Re: pg_temp.<pid>.<int> |