Re: Comments on tables

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: pasman pasmański <pasman(dot)p(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Comments on tables
Date: 2010-11-10 09:33:53
Message-ID: AANLkTi=M-M7=d5uqoBqEQR8V6EgBrdFr8cKiu-3CdNKF@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/11/10 pasman pasmański <pasman(dot)p(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bjørn T Johansen 2010-11-10 12:07:49 Does not use index on query using "field is null"?
Previous Message pasman pasmański 2010-11-10 09:25:13 Comments on tables