| From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
|---|---|
| To: | Iain <iain(at)mst(dot)co(dot)jp> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: tightening up on use of oid 0 |
| Date: | 2004-10-14 02:40:03 |
| Message-ID: | 416DE703.8080202@opencloud.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Iain wrote:
> Hi Oliver,
>
> Just out of interest, is the case you marked,
>
>> setObject(i, (Integer)null); // (*)
>
> equivalent to
>
> Integer someInteger = null;
> setObject(i, someInteger);
>
> ?
Yes.
> I would ask the question then, is there any situation where there is no
> alternative to the insufficiantly typed calls you listed?
I think there is always an alternative.
For standard types you can use setNull or setObject with a type code:
setNull(i, Types.INTEGER);
setObject(i, null, Types.INTEGER);
For extension types (classed as Types.OTHER) you can use the singleton
NULL objects I introduced in my patch:
setObject(i, PGline.NULL);
setObject(i, PGline.NULL, Types.OTHER);
-O
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Euler Taveira de Oliveira | 2004-10-14 04:36:30 | Corrections and Translation update: pt_BR |
| Previous Message | Iain | 2004-10-14 02:30:03 | Re: tightening up on use of oid 0 |