From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | CaT <cat(at)zip(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Feature Request: inline comments |
Date: | 2007-11-07 23:50:31 |
Message-ID: | 47324F47.6060809@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
CaT wrote:
> On Wed, Nov 07, 2007 at 06:32:53PM -0500, Tom Lane wrote:
>
>> CaT <cat(at)zip(dot)com(dot)au> writes:
>>
>>> It is a pretty obvious suggestion I bet was made many, many times
>>> before, but it would be very useful if you could create comments while
>>> creating the objects themselves, like
>>>
>>> CREATE TABLE FOO (
>>> ID INTEGER NOT NULL PRIMARY KEY COMMENT 'The ID',
>>> VALUE VARCHAR(10) COMMENT 'The value',
>>> ) COMMENT 'The table';
>>>
>> This seems like a fairly bad idea to me, because it converts your table
>> definitions into proprietary syntax. Heaven help you trying to load the
>> above into any other database. With a separate COMMENT ON command, at
>> least you have a fighting chance of ignoring the errors and pressing on.
>>
>
> Well, in a dump of the DB, you could have them as COMMENT ON. Otherwise
> I /think/ this should do it in vim at least:
>
> :%s/ COMMENT '\([^']*''\)*[^']*'//
>
> It's not a perfect regex (though I think it could be made to hand E''
> escaping) but it'll do for most comments.
>
>
No it won't. There's dollar quoting to think of, and multiline comments.
It all looks like clutter to me anyway.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Gevik Babakhani | 2007-11-07 23:53:00 | Re: Throw error and ErrorContext question. |
Previous Message | CaT | 2007-11-07 23:41:56 | Re: Feature Request: inline comments |