Re: Comments on tables - Mailing list pgsql-general

From Vibhor Kumar
Subject Re: Comments on tables
Date
Msg-id 3C1983E6-9F77-4F98-BDE4-E0C23F390F89@enterprisedb.com
Whole thread Raw
In response to Comments on tables  (pasman pasmański <pasman.p@gmail.com>)
List pgsql-general
On Nov 10, 2010, at 2:55 PM, pasman pasmański wrote:

> How to add comment on table with calculated value ?
>
> COMMENT ON TABLE test IS 'Updated ' || current_date;


You can create function to do that.

Or

If you are using PG9.0, then DO would help you, as given below:
do $$
Declare
t text;
begin
t:='COMMENT ON TABLE TEST_COPY IS '||''''||'TEST WITH '||current_date||'''';
execute t;
end;
$$ language plpgsql;

Thanks & Regards,
Vibhor Kumar



pgsql-general by date:

Previous
From: Bjørn T Johansen
Date:
Subject: Re: Does not use index on query using "field is null"?
Next
From: Jason
Date:
Subject: PostgreSQL 8.2.3