Received: from localhost.localdomain ([61.9.5.199]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9B7Ltn18543 for ; Thu, 11 Oct 2001 03:22:09 -0400 (EDT) (envelope-from dongski@popdem.org) Received: from dongski.popdem.org (IDENT:dongski@[172.16.0.222]) by localhost.localdomain (8.11.0/8.11.0) with SMTP id f9B7Mea26326 for ; Thu, 11 Oct 2001 15:22:57 +0800 Date: Thu, 11 Oct 2001 15:48:56 +0800 From: Dong B Calmada To: pgsql-admin@postgresql.org Subject: how to create function/procedure for commenting multiple objects (e.g., columns) Message-ID: <20011011154856.A892@dongski.popdem.org> Reply-To: Dong B Calmada Mail-Followup-To: pgsql-admin@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Institute for Popular Democracy X-Operating-System: Linux/2.2.16-22 (i686) Lines: 27 X-Archive-Number: 200110/96 X-Sequence-Number: 2342 Hi colleagues, I wanted to create a procedure or function that would facilitate my task of commenting multiple columns. I tried to do so with the following script: 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'. I even tried to create a C solution for this but it only caused a segmentation fault to the backend side. Please help. -- DONG B. CALMADA Polmap Chief Information Officer Institute for Popular Democracy http://www.ipd.ph Tel. (63-2) 4346674 Fax (63-2) 9262893 Mobile Phone No. 0917-9339099 Alternate email addresses: dongski4martin@yahoo.com dongski@calban.org ----------------------------------- Information is power! Set it free!