Re: Request for comment on setting binary format output per session
От | Jeff Davis |
---|---|
Тема | Re: Request for comment on setting binary format output per session |
Дата | |
Msg-id | 4297b9e310172b9a1e6d737e21ad8796d0ab7b03.camel@j-davis.com обсуждение исходный текст |
Ответ на | Re: Request for comment on setting binary format output per session (Peter Eisentraut <peter.eisentraut@enterprisedb.com>) |
Список | pgsql-hackers |
On Wed, 2023-03-22 at 10:12 +0100, Peter Eisentraut wrote: > Sending type names is kind of useless if what comes back with the > result > (RowDescription) are OIDs anyway. > > The client would presumably have some code like > > if (typeoid == 555) > parseThatType(); > > So it already needs to know about the OIDs of all the types it is > interested in. Technically it's still an improvement because you can avoid an extra round-trip. The client library can pipeline a query like: SELECT typname, oid FROM pg_type WHERE typname IN (...list of supported type names...); when the client first connects, and then go ahead and send whatever queries you want without waiting for the response. When you get back the result of the pg_type query, you cache the mapping, and use it to process any other results you get. That avoids introducing an extra round-trip. I'm not sure if that's a reasonable thing to expect the client to do, so I agree that we should offer a better way. Regards, Jeff Davis
В списке pgsql-hackers по дате отправления: