Re: how to create function/procedure for commenting multiple objects (e.g., columns)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dong B Calmada <dongski(at)popdem(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how to create function/procedure for commenting multiple objects (e.g., columns)
Date: 2001-10-11 16:39:01
Message-ID: 10579.1002818341@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dong B Calmada <dongski(at)popdem(dot)org> writes:
> create function comment_columns(text,text) returns text as 'comment on $1 is $2' language 'sql';

> The attempt produced an error like: error at or near '$1'.

Try using plpgsql's EXECUTE to do this.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chad R. Larson 2001-10-11 17:15:43 Re: Database access error after upgrade 7.1.2 -> 7.1.3
Previous Message Tom Lane 2001-10-11 16:37:14 Re: Alter column / array