X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5F9A6528E7 for ; Wed, 6 Jul 2005 16:32:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61441-03 for ; Wed, 6 Jul 2005 19:32:27 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by svr1.postgresql.org (Postfix) with ESMTP id D44DD5284E for ; Wed, 6 Jul 2005 16:32:26 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i5so29832wra for ; Wed, 06 Jul 2005 12:32:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=odal5U3ZTJyGa++H7OJMBb/eEHuni7ZAgBNQ2dSHRIYEEu0rW7vUGViaong9Fap+Dqup833jhEA+xC86kOfiP08M9N6PLuLRWD6M7lN28H2xXlPH36/HmFHH6mGpLzcjfDqyuzvv/GDc5Lr9AwJeClNYGsEMoJsMI8NGojQIp4k= Received: by 10.54.44.7 with SMTP id r7mr56964wrr; Wed, 06 Jul 2005 12:32:27 -0700 (PDT) Received: by 10.54.128.17 with HTTP; Wed, 6 Jul 2005 12:32:26 -0700 (PDT) Message-ID: <688c0b750507061232430f774e@mail.gmail.com> Date: Wed, 6 Jul 2005 15:32:26 -0400 From: Jocelyn Turcotte Reply-To: Jocelyn Turcotte To: pgsql-sql@postgresql.org Subject: Prepare plan in plpgsql Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.136 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200507/35 X-Sequence-Number: 22013 Hi, i'm wondering if there is a way to prepare and execute a plan in a plpgsql function. The prepare seems to work as expected but obviously the execute plan_name(...) statement is interpreted as the plpgsql execute keyword and says me that the plan_name function don't exists is there a way to use prepared queries in plpgsql? if not what is the best way to pass a parameter directly to a query? (im using postGIS and it would be nice if I could use another way that unparsing and parsing a geometry parameter in an execute dynamic query) thank you and have all a nice day!