Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f15G0rx21368 for ; Mon, 5 Feb 2001 11:00:53 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.3) with HTTP id 1186645; Mon, 05 Feb 2001 08:00:49 -0800 From: "Josh Berkus" Subject: Re: PL/PGSQL function with parameters To: David Richter Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.3 Date: Mon, 05 Feb 2001 08:00:49 -0800 Message-ID: In-Reply-To: <3A76B039.9A59890@DKFZ-heidelberg.de> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200102/47 X-Sequence-Number: 1217 Mr. Richter, > I wrote that function, wich doesn't work. I want to hand > over the name > of the tables(relation_table, update_table) and a > column(column_to_fill). The intention is, to use the > function also with > other tables(not hard coded). 1. Try using type VARCHAR instead of TEXT for the parameters. PL/pgSQL may be objecting to the "undefined" size of TEXT. 2. I don't believe that you can supply variables in the place of object names in PL/pgSQL, only in place of values. Thus, "SELECT * FROM table_name" would be invalid. (Jan, please tall me if I'm wrong in this; I could really use the functionality if it *is* possible.) You could use some creative manipulation of the system tables to achieve the same result, however. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco