Search Postgresql Archives

Re: Prepared statement already exists

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

 



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

[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