Re: [JDBC] V3 protocol + DECLARE problems

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [JDBC] V3 protocol + DECLARE problems
Дата
Msg-id 9813.1090509192@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [JDBC] V3 protocol + DECLARE problems  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: [JDBC] V3 protocol + DECLARE problems
Re: [JDBC] V3 protocol + DECLARE problems
Список pgsql-hackers
Oliver Jowett <oliver@opencloud.com> writes:
> It seems like we should pass the original parameters from execution of 
> the DECLARE utility portal down through PortalRunUtility -> 
> ProcessUtility -> PerformCursorOpen, copy them into the newly created 
> portal's memory context, and pass the copies to PortalStart on the new 
> portal.

> Does that sound about right?

Hm.  The copying bit bothers me, and I guess after some thought it's
a semantic issue.  If you've got
DECLARE c CURSOR FOR SELECT ... WHERE foo = $1;
FETCH 10 FROM c;

it's not very clear when the value of $1 should be supplied.  With your
proposal the parameter value would have to be supplied in the Bind
message for the DECLARE CURSOR command.  That may be the only way to do
it (certainly I'd not want several successive FETCHes to use different
parameter values), but it still seems a bit weird.

BTW, rather than hacking the parameter list of ProcessUtility,
I'd be inclined to just look at ActivePortal->portalParams in
PerformCursorOpen.  (Come to think of it, we could also copy
ActivePortal's sourceText at the PortalDefineQuery step.)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [pgsql-hackers-win32] Weird new time zone
Следующее
От: Bruce Momjian
Дата:
Сообщение: Release notes