pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feednull and integer field
2+ messages / 2 participants
[nested] [flat]
* null and integer field
@ 2000-01-20 00:57 Hamid Khoshnevis <hamid@emarq.com>
0 siblings, 1 reply; 2+ messages in thread
From: Hamid Khoshnevis @ 2000-01-20 00:57 UTC (permalink / raw)
To: pgsql-sql
The content of an integer field when unassigned appears to be different from
pushing a null into that field. Can someone please explain the difference
and show me how to push an 'unassigned' into that integer field.
I am using:
update table foo set integer_field=null where blah blah;
Thanks,
hamid
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] null and integer field
@ 2000-01-20 02:20 Tom Lane <tgl@sss.pgh.pa.us>
parent: Hamid Khoshnevis <hamid@emarq.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2000-01-20 02:20 UTC (permalink / raw)
To: Hamid Khoshnevis <hamid@emarq.com>; +Cc: pgsql-sql
"Hamid Khoshnevis" <hamid@emarq.com> writes:
> The content of an integer field when unassigned appears to be different from
> pushing a null into that field. Can someone please explain the difference
> and show me how to push an 'unassigned' into that integer field.
There is no such concept as 'unassigned' in SQL; whatever you are
observing, it's not that. An integer field should indeed be NULL
if it hasn't got a default and you didn't provide a value when you
inserted the tuple.
Can you provide more details about the problem you're having?
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-01-20 02:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-20 00:57 null and integer field Hamid Khoshnevis <hamid@emarq.com>
2000-01-20 02:20 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox