Re: getObject() returns integer instead of LargeObject
От | Oliver Jowett |
---|---|
Тема | Re: getObject( |
Дата | |
Msg-id | 42E61392.8030005@opencloud.com обсуждение исходный текст |
Ответ на |
Re: getObject( |
Список | 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
В списке pgsql-jdbc по дате отправления: