X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 506B89255CA for ; Thu, 22 May 2003 01:44:41 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 52707-06 for ; Thu, 22 May 2003 01:43:46 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by developer.postgresql.org (Postfix) with ESMTP id EB8C7923540 for ; Wed, 21 May 2003 22:45:48 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4M2jiU6013730; Wed, 21 May 2003 22:45:44 -0400 (EDT) To: Franco Bruno Borghesi Cc: pgsql-sql@postgresql.org Subject: Re: function prepared plan In-reply-to: <200303211910.01785.franco@akyasociados.com.ar> References: <200303211910.01785.franco@akyasociados.com.ar> Comments: In-reply-to Franco Bruno Borghesi message dated "Fri, 21 Mar 2003 19:10:01 -0300" Date: Wed, 21 May 2003 22:45:44 -0400 Message-ID: <13729.1053571544@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/412 X-Sequence-Number: 13577 Franco Bruno Borghesi writes: > Hi everyone! I have a little problem, and was wondering if anyone > could help me. Change the EXECUTEd query strings so that all the variants return TEXT, instead of trying to cast after-the-fact. If that doesn't seem reasonable, you might be better off working in pltcl. plpgsql is designed on the assumption that it can cache query plans from one execution to the next, which is a good speed optimization but does require a certain amount of stability of datatypes. If you'd prefer to kiss off speed for flexibility, pltcl is your tool. plpython might work too, but I'm not very familiar with it and couldn't say for certain. regards, tom lane