On Thu, Nov 20, 2008 at 15:45, Sam Mason <sam@xxxxxxxxxxxxx> wrote: > On Wed, Nov 19, 2008 at 09:42:33PM +0200, WireSpot wrote: >> I also imagined some workarounds in the code (PHP), such as defining a >> global/static hash table and registering statement names with it. But >> I'd like to know if there's a better way. > > Have you thought about using stored procedures instead of prepared > statements? No need to register them or keep track of that state. I'm not sure if it would work. What I'm trying to do is have an application layer which takes all the client queries and makes prepared statements out of them. Do you mean to say I should make stored procedures out of them instead? Granted, CREATE FUNCTION has OR REPLACE, but other than that it's only complicating matters. A function needs to have the argument types defined, for example, I can't get away with simply listing them like I do when executing a statement. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general