Getting the results columns before execution

Поиск
Список
Период
Сортировка
От Shachar Shemesh
Тема Getting the results columns before execution
Дата
Msg-id 400BE60D.9060201@shemesh.biz
обсуждение исходный текст
Ответы Re: Getting the results columns before execution  (Darko Prenosil <darko.prenosil@finteh.hr>)
Re: Getting the results columns before execution  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all,
From the OLE DB manual:

> The consumer can also get information about the columns of the rowset 
> by calling IColumnsInfo::GetColumnInfo, which all providers must 
> support, or IColumnsRowset::GetColumnsRowset, which providers may 
> support, on the command.
>
> Before calling GetColumnInfo or GetColumnsRowset, the consumer must 
> set the command text and, if the provider supports command 
> preparation, prepare the command object.
>
The problem - it appears there is no requirement to execute the command 
before asking about the rowset returned. Only setting the actual command 
and preparing it. This is a problem, as merely preparing a command is 
not enough to get the returned rows information.

I'm wondering whether anyone on this list(s) have an idea how to solve 
this? I can start the command in a cursor, and not retrieve information 
until requested. I can also execute the command with "where 0" appended 
to it. Neither solutions seem very practical or good performance wise.
               Shachar

-- 
Shachar Shemesh
Lingnu Open Systems Consulting
http://www.lingnu.com/




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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: What's planned for 7.5?
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: VACUUM delay (was Re: What's planned for 7.5?)