Re: Allow COPY to use parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Allow COPY to use parameters
Дата
Msg-id 17445.1464126003@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Allow COPY to use parameters  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> Hm, what's the use case preparing COPY?  Note, the biggest pain point
> I have with COPY is not being able to parameterize the filename
> argument.

Yeah.  But putting a parameter symbol there (or anywhere in a utility
statement that's not part of an analyzable subexpression) introduces a
bunch of new issues.  We don't really have a notion of a specific data
type associated with most arguments of utility statements, which
complicates parse analysis (specifically, resolution of the data type to
be attributed to the parameter symbol).  And we don't have provision for
applying expression evaluation to such arguments, which is what you'd
expect to need to do to obtain the value of a parameter symbol.  In many
cases you absolutely don't want expression evaluation to happen in
utility statements, because it would complicate semantics significantly.

Bottom line is that there's a pretty large can of worms hiding under
this, and I am not eager to open it.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: To-Do item: skip table scan for adding column with provable check constraints
Следующее
От: Tom Lane
Дата:
Сообщение: Re: To-Do item: skip table scan for adding column with provable check constraints