Re: Comments on tables - Mailing list pgsql-general

From Szymon Guz
Subject Re: Comments on tables
Date
Msg-id AANLkTi=M-M7=d5uqoBqEQR8V6EgBrdFr8cKiu-3CdNKF@mail.gmail.com
Whole thread Raw
In response to Comments on tables  (pasman pasmański <pasman.p@gmail.com>)
List pgsql-general
2010/11/10 pasman pasmański <pasman.p@gmail.com>
Hello.


How to add comment on table with calculated value ?

COMMENT ON TABLE test IS 'Updated ' || current_date;

not works ...


Hi,
I'd suggest something like this:

do $$
begin
  execute 'COMMENT ON TABLE test_count is ''Updated ' || current_date || '''';
end$$; 

This would run on postgres from 9.0, for earlier versions, you could always write similar function.


regards
Szymon

pgsql-general by date:

Previous
From: pasman pasmański
Date:
Subject: Comments on tables
Next
From: Bjørn T Johansen
Date:
Subject: Does not use index on query using "field is null"?