From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Marc Herbert <Marc(dot)Herbert(at)emicnetworks(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: getObject(<oid>) returns integer instead of LargeObject |
Date: | 2005-07-26 10:42:26 |
Message-ID: | 42E61392.8030005@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Marc Herbert wrote:
> What would you recommend to unambiguously identify a Blob column in a
> arbitrary ResultSet, using only JDBC?
I don't think there is any way to do this in general, via JDBC or any
other interface; you need schema-specific knowledge to work out which
oid columns refer to LOs and which refer to a different sort of oid
somewhere else.
The actual LO interface itself just looks like "create LO" -> "ok,
here's an oid identifying it"; there's nothing that ties the column you
happen to use to store that oid to the LO itself. See
http://www.postgresql.org/docs/8.0/static/largeobjects.html for more
details.
For comparison, contrib/vacuumlo assumes that any (non-system-generated)
oid column in the system could potentially reference a LO (in GC-speak
it's a conservative collector).
> PS: why do LOBs seem to use regular oids instead of some other less
> ambiguous say, "loid" ?
It's just an artifact of the implementation AFAIK.
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2005-07-26 11:33:15 | Re: work in progress: timestamp patch |
Previous Message | Oliver Jowett | 2005-07-26 10:23:20 | Re: work in progress: timestamp patch |