Re: [Re] wrong protocol sequence?

Поиск
Список
Период
Сортировка
От Андрей
Тема Re: [Re] wrong protocol sequence?
Дата
Msg-id 4332CAC1.1040805@softwarium.net
обсуждение исходный текст
Ответ на Re: wrong protocol sequence?  (John DeSoi <desoi@pgedit.com>)
Ответы Re: [Re] wrong protocol sequence?
Список pgsql-general
John DeSoi wrote:

> On Sep 22, 2005, at 10:11 AM, Андрей wrote:
>
>>     I'm sending such messages to server in native postgresql
>> protocol: 'Parse' -> 'Describe' -> 'Sync' (get: 'Parse Complete'  and
>> 'Ready For Query' messages back).
>>     But when the sequence became: 'Parse' -> 'Sync'  (get: 'Parse
>> Complete' and 'Ready For Query' messages back), little pause,
>> 'Describe' -> 'Sync' - server is crashing (error = memory can't be
>> 'read')!
>>
>>     My query is as simple as possible 'select * from table_name'.
>> What am I doing wrong?
>
>
> I think I recall having some problems around this also. But I don't
> think there is any reason to need Parse -> Sync anyway. If you just
> want to prepare, use Parse -> Describe -> Sync. For executing, Parse
> (if not already parsed) -> Bind -> Describe -> Execute -> Sync.
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL

    The reason is to get parameters description (if there are any in
query) before binding them to the backend. For example 'select * from
table_name where column_name = $1'. I would like to get required type of
parameter $1 to bind later. But I can't be sure at prepare time, that
I'll need such description in future.

        Thanks for your answer,
                    Andrei


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

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: wrong protocol sequence?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: ORDER BY results