From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: [GENERAL] JDBC +CIDR (fwd) |
Date: | 2004-10-21 22:42:17 |
Message-ID: | Pine.BSO.4.56.0410211732420.7477@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Fri, 22 Oct 2004, Oliver Jowett wrote:
> Kris Jurka wrote:
> > What kind of solution can we offer for this problem? Do we really need to
> > make PGobject extensions for every type? Do we really want to force
> > people to have to create these for all user defined types?
>
> Well, you don't have to create a subclass, I think, if you don't mind
> doing the parsing in the application:
Right, for some reason I thought PGobject was abstract. It's still not
great to force them to include postgresql specific code in their app, but
I don't see a way around it without abandoning the goal of removing the
use oid zero.
> Alternatively, does setString() + "?::cidr" work?
In this case yes, but not in general. The driver types it as text so this
really comes out as ?::text::cidr which is different from unknown -> cidr.
In this case an explicit cast is available, but this won't be true (by
default) of other types. Consider:
jurka=# select '(1,2),(3,4)'::text::box;
ERROR: cannot cast type text to box
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | Alexey Yudichev | 2004-10-22 11:22:21 | Problems with protocol V3 after migration to latest driver |
Previous Message | Oliver Jowett | 2004-10-21 20:45:00 | Re: [GENERAL] JDBC +CIDR (fwd) |