Re: Allow COPY to use parameters

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Allow COPY to use parameters
Дата
Msg-id 20160524204228.GA4313@fetter.org
обсуждение исходный текст
Ответ на Re: Allow COPY to use parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Allow COPY to use parameters  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On Tue, May 24, 2016 at 02:16:40PM -0400, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > Per discussion on IRC and some test code, COPY can't take parameters
> > in a PREPARE, which feature would make it even more useful.
>
> Uh, what?
>
> regression=# prepare foo as copy c from stdin;
> ERROR:  syntax error at or near "copy"
> LINE 1: prepare foo as copy c from stdin;
>                        ^
>
> Passing parameters into a utility statement of any stripe is a
> pretty considerable project, IIRC; the infrastructure isn't there.

Maybe it should be, at least for some of the utility statements.

Please find attached a patch which, according to Andrew Gierth, its
author, just barely qualifies as a PoC.  Yes, it's had to break a
couple of messages in the regression tests.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Вложения

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

Предыдущее
От: Ants Aasma
Дата:
Сообщение: Re: Is the unfair lwlock behavior intended?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <