Re: Allow COMMENT ON to accept an expression rather than just a string

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Abhijit Menon-Sen <ams(at)oryx(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Allow COMMENT ON to accept an expression rather than just a string
Date: 2009-04-11 17:29:15
Message-ID: 162867790904111029k7a4c4d8diff0d4f5f1cd4f63b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/4/11 Bruce Momjian <bruce(at)momjian(dot)us>:
> Tom Lane wrote:
>> Abhijit Menon-Sen <ams(at)oryx(dot)com> writes:
>> > There's a TODO item about making COMMENT ON accept an expression. The
>> > grammar change is simple (SConst|NULL_P->a_expr), but as far as I can
>> > see, there are no similar utility commands that take expressions, and
>> > I'm not very familiar with the planner and executor, so I could use
>> > some advice about how to evaluate the expression.
>>
>> There aren't *any* utility commands that take expressions, and I would
>> say that that TODO item is seriously mis-scoped.  What is the use of
>> making COMMENT in particular do this?  Fixing all of them might be
>> interesting.
>
> I remember adding the TODO after a request from the user, but I have not
> seen further requests.  I have remove the item;  let's see if we get any
> further requests for it.

I thing so this TODO point is little bit step in bad direction. The
people use comment for storing some info about database object, that
should be available from dictionary. Typical use case is info about
last modification or create time. Now I am working in bigger
organisation and I see, so this informations are very important. So
well solution is add some table to dictionary, that store "create
timestamp, modification timestamp (ALTER), version (number of
changes)" to every database object where this has sense. Comment
should be stable and only text.

regards
Pavel Stehule

>
> --
>  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
>  EnterpriseDB                             http://enterprisedb.com
>
>  + If your life is a hard drive, Christ can be your backup. +
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-11 18:08:21 Re: Allow COMMENT ON to accept an expression rather than just a string
Previous Message Pavel Stehule 2009-04-11 17:21:41 Re: Patch for 8.5, transformationHook