pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_locks.transaction field type
6+ messages / 3 participants
[nested] [flat]
* pg_locks.transaction field type
@ 2005-08-18 03:05 Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:27 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
0 siblings, 1 reply; 6+ messages in thread
From: Joseph Shraibman @ 2005-08-18 03:05 UTC (permalink / raw)
To: pgsql-general@postgresql.org; pgsql-jdbc
I have a method in my rmi server that takes a query and returns an
Object[][]. I had this query:
SELECT (select relname from pg_catalog.pg_class where relfilenode =
relation) as relname, * FROM pg_locks;
After upgrading from 7.4 to 8.0 I was getting this problem:
WARNING: Servlet.service() for servlet jsp threw exception
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.lang.ClassNotFoundException: org.postgresql.util.PGobject
(no security manager: RMI class loader disabled)
The problem seems to be the "transaction" field. It looks like a number
type, but I can't really tell because "\d pg_catalog" doesn't work in psql.
So what's the difference between 7.4.7 and 8.0.3? Is it that 7.4.7
never returned anything in the transaction field? Is it a jdbc bug that
is returning the answer as org.postgresql.util.PGobject instead of some
kind of Number?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [JDBC] pg_locks.transaction field type
2005-08-18 03:05 pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
@ 2005-08-18 03:27 ` Oliver Jowett <oliver@opencloud.com>
2005-08-18 03:48 ` Re: [JDBC] pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Jowett @ 2005-08-18 03:27 UTC (permalink / raw)
To: Joseph Shraibman <jks@selectacast.net>; +Cc: pgsql-general@postgresql.org; pgsql-jdbc
Joseph Shraibman wrote:
> Is it a jdbc bug that
> is returning the answer as org.postgresql.util.PGobject instead of some
> kind of Number?
The column's type is 'xid' which the driver doesn't currently handle, so
it gets put into the "wrap it in PGobject" bucket.
I'm not sure what's changed between 7.4 & 8.0 -- did you also change
JDBC driver versions?
Perhaps your server should convert instances of PGobject to their string
representations before returning them across RMI.
-O
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [JDBC] pg_locks.transaction field type
2005-08-18 03:05 pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:27 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
@ 2005-08-18 03:48 ` Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:55 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
0 siblings, 1 reply; 6+ messages in thread
From: Joseph Shraibman @ 2005-08-18 03:48 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-general@postgresql.org; pgsql-jdbc
Oliver Jowett wrote:
> Joseph Shraibman wrote:
>
>> Is it a jdbc bug that is returning the answer as
>> org.postgresql.util.PGobject instead of some kind of Number?
>
>
> The column's type is 'xid' which the driver doesn't currently handle, so
> it gets put into the "wrap it in PGobject" bucket.
Is xid a type of number?
>
> I'm not sure what's changed between 7.4 & 8.0 -- did you also change
> JDBC driver versions?
yes
>
> Perhaps your server should convert instances of PGobject to their string
> representations before returning them across RMI.
That's what I'll do. Are there any other classes besides
org.postgresql.util.PGobject that I have to worry about?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [JDBC] pg_locks.transaction field type
2005-08-18 03:05 pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:27 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
2005-08-18 03:48 ` Re: [JDBC] pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
@ 2005-08-18 03:55 ` Oliver Jowett <oliver@opencloud.com>
2005-08-18 04:10 ` Re: [JDBC] pg_locks.transaction field type Alvaro Herrera <alvherre@alvh.no-ip.com>
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Jowett @ 2005-08-18 03:55 UTC (permalink / raw)
To: Joseph Shraibman <jks@selectacast.net>; +Cc: pgsql-general@postgresql.org; pgsql-jdbc
Joseph Shraibman wrote:
>> The column's type is 'xid' which the driver doesn't currently handle,
>> so it gets put into the "wrap it in PGobject" bucket.
>
> Is xid a type of number?
It's an internal backend type; I'm not familiar with the details.
>> Perhaps your server should convert instances of PGobject to their
>> string representations before returning them across RMI.
>
> That's what I'll do. Are there any other classes besides
> org.postgresql.util.PGobject that I have to worry about?
There are other classes for things like intervals and the geometric
types, but they should all be subclasses of PGobject.
-O
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [JDBC] pg_locks.transaction field type
2005-08-18 03:05 pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:27 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
2005-08-18 03:48 ` Re: [JDBC] pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:55 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
@ 2005-08-18 04:10 ` Alvaro Herrera <alvherre@alvh.no-ip.com>
2005-08-18 04:47 ` Re: [JDBC] pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
0 siblings, 1 reply; 6+ messages in thread
From: Alvaro Herrera @ 2005-08-18 04:10 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: Joseph Shraibman <jks@selectacast.net>; pgsql-general@postgresql.org; pgsql-jdbc
On Thu, Aug 18, 2005 at 03:55:43PM +1200, Oliver Jowett wrote:
> Joseph Shraibman wrote:
>
> >>The column's type is 'xid' which the driver doesn't currently handle,
> >>so it gets put into the "wrap it in PGobject" bucket.
> >
> >Is xid a type of number?
>
> It's an internal backend type; I'm not familiar with the details.
It's an unsigned 4 byte integer.
--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Cada quien es cada cual y baja las escaleras como quiere" (JMSerrat)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [JDBC] pg_locks.transaction field type
2005-08-18 03:05 pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:27 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
2005-08-18 03:48 ` Re: [JDBC] pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:55 ` Re: [JDBC] pg_locks.transaction field type Oliver Jowett <oliver@opencloud.com>
2005-08-18 04:10 ` Re: [JDBC] pg_locks.transaction field type Alvaro Herrera <alvherre@alvh.no-ip.com>
@ 2005-08-18 04:47 ` Joseph Shraibman <jks@selectacast.net>
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Shraibman @ 2005-08-18 04:47 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@alvh.no-ip.com.tupari.net>; +Cc: Oliver Jowett <oliver@opencloud.com>; pgsql-general@postgresql.org; pgsql-jdbc
So basically what needs to be changed is TypeInfoCache.java & Oid.java
Alvaro Herrera wrote:
> On Thu, Aug 18, 2005 at 03:55:43PM +1200, Oliver Jowett wrote:
>
>>Joseph Shraibman wrote:
>>
>>
>>>>The column's type is 'xid' which the driver doesn't currently handle,
>>>>so it gets put into the "wrap it in PGobject" bucket.
>>>
>>>Is xid a type of number?
>>
>>It's an internal backend type; I'm not familiar with the details.
>
>
> It's an unsigned 4 byte integer.
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2005-08-18 04:47 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-18 03:05 pg_locks.transaction field type Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:27 ` Oliver Jowett <oliver@opencloud.com>
2005-08-18 03:48 ` Joseph Shraibman <jks@selectacast.net>
2005-08-18 03:55 ` Oliver Jowett <oliver@opencloud.com>
2005-08-18 04:10 ` Alvaro Herrera <alvherre@alvh.no-ip.com>
2005-08-18 04:47 ` Joseph Shraibman <jks@selectacast.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox