Re: [GENERAL] invalid input syntax for integer: "NULL"

2007-02-20 Thread Stephan Szabo
On Tue, 20 Feb 2007, Yonatan Ben-Nes wrote: > Hi everyone, > > I'm trying to write a PL/pgSQL function which execute an insert, I encounter > a problem when I try to insert NULL value into an integer field. > The following code is for reproducing: > > CREATE TABLE test( > bh INT8 > ); > > CREATE O

Re: [GENERAL] invalid input syntax for integer: "NULL"

2007-02-20 Thread Karl O. Pinc
On 02/20/2007 03:45:55 PM, Yonatan Ben-Nes wrote: Hi everyone, I'm trying to write a PL/pgSQL function which execute an insert, I encounter a problem when I try to insert NULL value into an integer field. RETURN 'INSERT INTO test (bh) VALUES ('||COALESCE(intornull, 'NULL')||')'; And i

[GENERAL] invalid input syntax for integer: "NULL"

2007-02-20 Thread Yonatan Ben-Nes
Hi everyone, I'm trying to write a PL/pgSQL function which execute an insert, I encounter a problem when I try to insert NULL value into an integer field. The following code is for reproducing: CREATE TABLE test( bh INT8 ); CREATE OR REPLACE FUNCTION testinsertion(intornull bigint) RETURNS text