Skip site navigation (1) Skip section navigation (2)

Re: Possible to insert quoted null value into integer field?

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Possible to insert quoted null value into integer field?
Date: 2004-08-26 22:35:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On 8/26/2004 5:33 PM, Gaetano Mendola wrote:

> Jan Wieck wrote:
>> On 8/26/2004 4:27 AM, gnari wrote:
>>> "Pablo S" <pablo_tweek(at)yahoo(dot)com> wrote:
>>>> Hi all, I have search high and low on this -
>>>> Take for instance the statement :
>>>> insert into foo (text1, text2, int1) values ('Foo', 'Bar', '');
>>>> On Pg 7.2.x, the db would happily insert the null val into the int
>>>> field.  HOWSOMEVER, 7.4.x will explode and error back with:
>> You aren't inserting an SQL NULL value. You try to insert an empty 
>> string, which is not a valid integer representation.
>> Jan
> And IIRC for oracle an empty string is a NULL value  :-(

Who cares about Oracle? They are different things in the ANSI standard.


# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to


pgsql-general by date

Next:From: Marc G. FournierDate: 2004-08-26 22:46:59
Subject: Re: performance of IN (subquery)
Previous:From: Kevin MurphyDate: 2004-08-26 22:24:23
Subject: performance of IN (subquery)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group