Re: Prepared statements question

From: Neil Conway <neilc(at)samurai(dot)com>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared statements question
Date: 2003-01-10 04:50:41
Message-ID: 1042174241.551.5.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2003-01-10 04:51:04 Re: EXPLAIN EXECUTE
Previous Message Christopher Kings-Lynne 2003-01-10 04:02:40 Re: Prepared statements question