v7.4b2 : How can I use COMMENT ON for Large Objects ?

Started by Frank van Vugtover 22 years ago3 messagesgeneral
Jump to latest
#1Frank van Vugt
ftm.van.vugt@foxi.nl

Hi,

I noticed that the result of '\dl' in psql shows a second column
'Description'. I'd like to use that, but does anybody know how?

-> the client interface describtion in pt. 28.3 of the docs do not mention it

-> the mailinglist archives don't mention it

-> '\h comment' does not include 'large object'

-> trying 'comment on oid ... is '...'' shows this doesn't work indeed ;-)

Being able to identify what a particuler large object is used for, could prove
very usefull.

By the way, it's not like the LOB-interface is on it's way out, is it....???
It's nice to be able to avoid the escaping needed for the bytea type ;-)

TIA.

--
Best,

Frank.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Frank van Vugt (#1)
Re: v7.4b2 : How can I use COMMENT ON for Large Objects ?

Frank van Vugt <ftm.van.vugt@foxi.nl> writes:

I noticed that the result of '\dl' in psql shows a second column
'Description'. I'd like to use that, but does anybody know how?

This is a psql artifact, not a feature supported by the backend.
If you want to do likewise, emulate the code in src/bin/psql/large_obj.c.

regards, tom lane

#3Frank van Vugt
ftm.van.vugt@foxi.nl
In reply to: Tom Lane (#2)
Re: v7.4b2 : How can I use COMMENT ON for Large Objects ?

This is a psql artifact, not a feature supported by the backend.
If you want to do likewise, emulate the code in src/bin/psql/large_obj.c.

Thanks, it seems that since I also want to allow non-superusers as well to
'trigger' an automagically created comment on a large object 'upload', it was
easier to use a plpgsql function on the system tables with security definer.

--
Best,

Frank.