Re: Prepared statement already exists

Поиск
Список
Период
Сортировка
От WireSpot
Тема Re: Prepared statement already exists
Дата
Msg-id b2d4b0380811200603x1f0fc76akb237a0dba50ca456@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Prepared statement already exists  (Sam Mason <sam@samason.me.uk>)
Ответы Re: Prepared statement already exists  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
On Thu, Nov 20, 2008 at 15:45, Sam Mason <sam@samason.me.uk> 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Scara Maccai
Дата:
Сообщение: Re: return MAX and when it happened
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Prepared statement already exists