[General] Comments
[General] Comments
От:
"Brian E. Pangburn" <bepangburn@yahoo.com>
Дата:
1. Is it documented anywhere that an apostrophe / single quote is bad news inside of a C-style /* .... */ comment? I just found out the hard way. Seems to be OK inside of the one line -- comment. 2. How does one view column comments created with COMMENT ON COLUMN? TIA. Brian E. Pangburn
Re: [General] Comments
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> 1. Is it documented anywhere that an apostrophe / single quote is bad news > inside of a C-style /* .... */ comment? I just found out the hard way. > Seems to be OK inside of the one line -- comment. Seems to work here: test=> select * test-> /* 'test' test*> */ test-> from pg_language; lanname | lanispl | lanpltrusted | lanplcallfoid | lancompiler ----------+---------+--------------+---------------+------------- internal | f | f | 0 | n/a C | f | f | 0 | /bin/cc sql | f | f | 0 | postgres (3 rows) > 2. How does one view column comments created with COMMENT ON COLUMN? psql \d+ command. Not sure if \dd works too. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Re: [General] Comments
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Brian E. Pangburn" writes: > 1. Is it documented anywhere that an apostrophe / single quote is bad news > inside of a C-style /* .... */ comment? I just found out the hard way. It is? I can't find any problem. Test case? regards, tom lane
Re: [General] Comments
От:
"Brian E. Pangburn" <bepangburn@yahoo.com>
Дата:
With the help of Bruce Momjian and Tom Lane I was able to resolve my two
issues:
In PG 7.0.x, the following won't work because of the single apostrophe:
> test=> select *
> test-> /* doesn't work...
> test'> */
> test'> from pg_language;
It is reportedly fixed for 7.1
The following will display any column comments for "mytable"
\d+ mytable
Brian E. Pangburn
"Brian E. Pangburn" wrote in message
news:94i0d5$15s6$1@news.tht.net...
> 1. Is it documented anywhere that an apostrophe / single quote is bad news
> inside of a C-style /* .... */ comment? I just found out the hard way.
> Seems to be OK inside of the one line -- comment.
> 2. How does one view column comments created with COMMENT ON COLUMN?
>
> TIA.
> Brian E. Pangburn