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

Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Date: 2007-03-02 00:09:17
Message-ID: A3D1BE07-7266-4DCF-859A-69C67E44B3EF@fastcrypt.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
On 1-Mar-07, at 7:06 PM, Tom Lane wrote:

> Dave Cramer <pg(at)fastcrypt(dot)com> writes:
>> The reason that setNull is required is because the type information
>> is required. NULL by it self has no type information. The jdbc driver
>> binds values to a prepared statement and the type information is
>> required. So setNull( n, typeinfo) is required to bind the correct  
>> type.
>
> At least in this particular case, leaving the parameter type as  
> UNKNOWN
> would have worked as the OP wishes.  I dunno if that would break other
> cases though.

This means you have to leave all parameter types as UNKNOWN. What's  
the point of having parameter types at all ?

Dave
> 			regards, tom lane
>


In response to

Responses

pgsql-jdbc by date

Next:From: Tom LaneDate: 2007-03-02 00:16:18
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Previous:From: Tom LaneDate: 2007-03-02 00:06:04
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?

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