Thread: Question about comments
I posted this msg previously but received no responses, perhaps this time?? I'm running Postgresql 6.3.2. When ones gets help on the built-in commands that start with '\' there is a command '\dd [object]'. In the comments is says that it lists the comment for the object, eg. table, field etc. Is this command operative under 6.3.2? If so, how does one get the comment(s) into those objects? The '\h create table' etc gives no idea. Also which of the system tables (pg_?) are these comments written to? Thanks. Cheers...Gordon ~~~~~~~~~~~~~~ 4ZzZ Brisbane's First Community FM Station ~~~~~~~~~~~~~~ The Demo Show - Supporting Australian UnsignedArtists Mon nights 6-7pm (0800-0900UTC) on 4ZzZ 102.1 FM http://www.4zzzfm.org.au/welcome.html(RA feed) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Gordon Clarke <gordonc@cyberbiz.net.au> writes: > I'm running Postgresql 6.3.2. > When ones gets help on the built-in commands that start with '\' there is > a command '\dd [object]'. In the comments is says that it lists the > comment for the object, eg. table, field etc. > Is this command operative under 6.3.2? If so, how does one get the > comment(s) into those objects? The '\h create table' etc gives no idea. > Also which of the system tables (pg_?) are these comments written to? pg_description, I believe. AFAIK there's no special support for adding entries to it :-(. You can insert entries manually, but it'd be nicer to have some kind of specialized command for that... regards, tom lane
> Gordon Clarke <gordonc@cyberbiz.net.au> writes: > > I'm running Postgresql 6.3.2. > > > When ones gets help on the built-in commands that start with '\' there is > > a command '\dd [object]'. In the comments is says that it lists the > > comment for the object, eg. table, field etc. > > > Is this command operative under 6.3.2? If so, how does one get the > > comment(s) into those objects? The '\h create table' etc gives no idea. > > Also which of the system tables (pg_?) are these comments written to? > > pg_description, I believe. AFAIK there's no special support for adding > entries to it :-(. You can insert entries manually, but it'd be nicer > to have some kind of specialized command for that... Yes, that is on the TODO list. Currently, the initdb command pulls hard-coded comments out of the include/catalog/*.h files, and loads them in indexed on oid. You can add your own. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026