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

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

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: Possible to insert quoted null value into integer field?
Date: 2004-08-26 21:33:46
Message-ID: 412E573A.3010500@bigfoot.com (view raw or flat)
Thread:
Lists: pgsql-general
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  :-(


Regards
Gaetano Mendola





In response to

Responses

pgsql-general by date

Next:From: Mark DexterDate: 2004-08-26 21:42:14
Subject: Creating Functions in Separate Schema
Previous:From: Greg StarkDate: 2004-08-26 21:32:17
Subject: Re: R: R: space taken by a row & compressed data

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