Re: [JDBC] V3 protocol + DECLARE problems

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: [JDBC] V3 protocol + DECLARE problems
Дата
Msg-id 40FFA5C0.7050701@opencloud.com
обсуждение исходный текст
Ответ на Re: [JDBC] V3 protocol + DECLARE problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [JDBC] V3 protocol + DECLARE problems
Re: [JDBC] V3 protocol + DECLARE problems
Список pgsql-hackers
Tom Lane wrote:

[... DECLARE with parameters failing ...]

>>Any chance of getting this fixed for 7.5?
> 
> 
> I'm up to my keister in PITR and nested-xact issues and won't have time
> to look at it soon.  Do you want to take a look and see if you can find
> where the ball is getting dropped?

Here's what I've found so far:

The error occurs where it does because it is a DECLARE CURSOR WITH HOLD 
outside an explicit transaction, so the resulting cursor is immediately 
materialized when the implicit commit at end of statement happens. This 
implicitly fetches all rows, and it's the fetch that fails.

When the DECLARE is enclosed in an explicit transaction, it succeeds, 
but then subsequent FETCHes fail with the same error.

DECLARE -> PerformCursorOpen always passes NULL as a parameter list to 
PortalStart() on the newly created portal, so no parameters are 
available when executing it.

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?

-O


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

Предыдущее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: [pgsql-hackers-win32] Weird new time zone
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Completed TODO item?