Re: Proposal to provide the facility to set binary format output for specific OID's per session

Поиск
Список
Период
Сортировка
От Sehrope Sarkuni
Тема Re: Proposal to provide the facility to set binary format output for specific OID's per session
Дата
Msg-id CAH7T-arqow+s_RE7ap0VNftSUtY_EOWY5sfnZE7ksMrD6cXXsg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal to provide the facility to set binary format output for specific OID's per session  (Joe Conway <mail@joeconway.com>)
Ответы Re: Proposal to provide the facility to set binary format output for specific OID's per session  (Dave Cramer <davecramer@gmail.com>)
Список pgsql-hackers
Idea here makes sense and I've seen this brought up repeatedly on the JDBC lists.

Does the driver need to be aware that this SET command was executed? I'm wondering what happens if an end user executes this with an OID the driver does not actually know how to handle.

> + Oid *tmpOids = palloc(length+1);
> ...
> + tmpOids = repalloc(tmpOids, length+1);

These should be: sizeof(Oid) * (length + 1)

Also, I think you need to specify an explicit context via MemoryContextAlloc or the allocated memory will be in the default context and released at the end of the command.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

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

Предыдущее
От: Nikita Malakhov
Дата:
Сообщение: Re: Pluggable toaster
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Proposal to provide the facility to set binary format output for specific OID's per session