Dong B Calmada <dongski@popdem.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