Search Postgresql Archives

Re: Prepared statement already exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merlin Moncure escribió:
> On Wed, Nov 19, 2008 at 2:42 PM, WireSpot <wirespot@xxxxxxxxx> wrote:

> > 3) Reading a list of all the currently defined prepared statements to
> > see if the one I want is already prepared. I'm hoping some "magic"
> > SELECT in pg's internal tables may do the trick. But I also worry
> > about introducing overhead this way.
> 
> pg_prepared_statements (on recent versions of postgresql)
> 
> also, watch out for race conditions.

What race conditions?  Prepared statements are per-connection.

Perhaps the application could keep a hash of statements prepared so far,
to avoid having to query pg_prepared_statements all the time.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux