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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: 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 10:34:07
Message-ID: 200904111034.n3BAY7b02016@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova wrote:
> On Fri, Apr 10, 2009 at 11:47 PM, Abhijit Menon-Sen <ams(at)oryx(dot)com> wrote:
> > Hi.
> >
> > There's a TODO item about making COMMENT ON accept an expression.
>
> really? what's the use case for that?

I assume it is for creating comments using things like || or maybe
CURRENT_TIMESTAMP:

test=> CREATE TABLE test (x INT);
CREATE TABLE
test=> COMMENT ON TABLE test IS 'asdf';
COMMENT
test=> COMMENT ON TABLE test IS 'asdf' || 'bb';
ERROR: syntax error at or near "||"
LINE 1: COMMENT ON TABLE test IS 'asdf' || 'bb';

--
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. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hitoshi Harada 2009-04-11 12:33:16 Re: Closing some 8.4 open items
Previous Message Grzegorz Jaskiewicz 2009-04-11 09:06:58 Re: Closing some 8.4 open items