Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 38039475951 for ; Fri, 24 May 2002 05:25:05 -0400 (EDT) Received: from tsmtp4.mail.isp (mailhost2.teleline.es [195.235.113.141]) by postgresql.org (Postfix) with ESMTP id 48FD7475943 for ; Fri, 24 May 2002 05:25:03 -0400 (EDT) Received: from terra.es ([213.98.70.162]) by tsmtp4.mail.isp (Netscape Messaging Server 4.15 tsmtp4 Mar 14 2002 21:29:48) with ESMTP id GWLZFG00.N1X; Fri, 24 May 2002 11:23:40 +0200 Message-ID: <3CEDF8AA.4CFF9A8C@terra.es> Date: Fri, 24 May 2002 10:24:10 +0200 From: Gabriel Dovalo Carril X-Mailer: Mozilla 4.76 [es] (X11; U; Linux 2.4.0-4GB i686) X-Accept-Language: en MIME-Version: 1.0 To: "Rajesh Kumar Mallah." Cc: Lista SQL de postgres Subject: Re: Functions with dynamic queries References: <3CECC5C5.BDF77592@terra.es> <200205231914.27923.mallah@trade-india.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Archive-Number: 200205/263 X-Sequence-Number: 7898 "Rajesh Kumar Mallah." escribi=F3: >=20 > I guess the examples on standard docs explain it. > dont they? >=20 Hi Rajesh, I have read docs examples again, and even examples at: http://www.brasileiro.net/postgres/plpgsql/plpgsql-description.html section 1.2.5.3, which explains how to execute dynamic queries. At the end of this section there is an example with a comment: -- This works because we are not substituting any variables -- Otherwise is would fail. And I need to know how can a query be executed substituting variables. Thanks, -- Gabriel D.