Prepare plan in plpgsql

From: Jocelyn Turcotte <turcotte(dot)j(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Prepare plan in plpgsql
Date: 2005-07-06 19:32:26
Message-ID: 688c0b750507061232430f774e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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!

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-07-06 19:55:59 Re: Prepare plan in plpgsql
Previous Message Tom Lane 2005-07-06 14:44:14 Re: left joins