Search Postgresql Archives

Re: Comments on tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux