Re: Prepared statements question - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Prepared statements question
Date
Msg-id 1042174241.551.5.camel@tokyo
Whole thread Raw
In response to Prepared statements question  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: Prepared statements question  (Kevin Brown <kevin@sysexperts.com>)
List pgsql-hackers
On Thu, 2003-01-09 at 22:48, Christopher Kings-Lynne wrote:
> With prepared statements being all well and good, how do I know if the query
> has not yet been prepared in the backend?  Or is this simply a situation
> where I can't win?

Try the EXECUTE; if it fails, run the PREPARE and then rerun the
EXECUTE.

It would be pretty trivial to add a function that checks if a query with
a given name has already been prepared -- is that worth doing?

Cheers,

Neil



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Prepared statements question
Next
From: Neil Conway
Date:
Subject: Re: EXPLAIN EXECUTE