Обсуждение: RowDescription via the SQL?

Поиск
Список
Период
Сортировка

RowDescription via the SQL?

От
Dmitry Igrishin
Дата:
Hi,

It's possible to query pg_prepared_statements view to obtain the
information about
parameters used in the statement that was prepared. But I don't found
how to get the
information about the rows that will be returned when the statement is
eventually executed.
(It's possible to get this information via the frontend/backend
protocol as a response
on the Describe.) But out of interest, is it possible to get such
information via the SQL?

--
// Dmitry.


Re: RowDescription via the SQL?

От
Merlin Moncure
Дата:
On Thu, Jun 2, 2016 at 1:14 AM, Dmitry Igrishin <dmitigr@gmail.com> wrote:
> Hi,
>
> It's possible to query pg_prepared_statements view to obtain the
> information about
> parameters used in the statement that was prepared. But I don't found
> how to get the
> information about the rows that will be returned when the statement is
> eventually executed.
> (It's possible to get this information via the frontend/backend
> protocol as a response
> on the Describe.) But out of interest, is it possible to get such
> information via the SQL?

hm. what's the use case?  and, what's the definition of "eventually"?

merlin


Re: RowDescription via the SQL?

От
Dmitry Igrishin
Дата:
2016-06-03 1:55 GMT+03:00 Merlin Moncure <mmoncure@gmail.com>:
> On Thu, Jun 2, 2016 at 1:14 AM, Dmitry Igrishin <dmitigr@gmail.com> wrote:
>> Hi,
>>
>> It's possible to query pg_prepared_statements view to obtain the
>> information about
>> parameters used in the statement that was prepared. But I don't found
>> how to get the
>> information about the rows that will be returned when the statement is
>> eventually executed.
>> (It's possible to get this information via the frontend/backend
>> protocol as a response
>> on the Describe.) But out of interest, is it possible to get such
>> information via the SQL?
>
> hm. what's the use case?
It's about consistency. It's possible to prepare the statement either
via SQL and fe/be protocol , it's possible to get the information
about parameters of prepared statement either via SQL and fe/be
protocol, but getting the information about the resulting rows is only
possible via the fe/be protocol.

>  and, what's the definition of "eventually"?
I borrowed this definition from here
https://www.postgresql.org/docs/9.6/static/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
(The Describe message (statement variant) ...)

--
// Dmitry.