Re: BUG #15927: PGresult *PQexecParams(..) not work on view

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #15927: PGresult *PQexecParams(..) not work on view
Дата
Msg-id 20190726182144.ezu2rzad2uh2p5r2@alap3.anarazel.de
обсуждение исходный текст
Ответ на BUG #15927: PGresult *PQexecParams(..) not work on view  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
Hi,

On 2019-07-26 18:11:08 +0000, PG Bug reporting form wrote:
> create temp table ttt(a text)
> ...
> select * from ttt where a= $1
> create temp view vvv as select * from ttt where a= $1
> >ERROR: bind message supplies 1 parameters, but prepared statement ""
> requires 0

It's not really PQexecParams()'s fault that this doesn't work - we
simply do not support using parameters for DDL. And especially in a case
like this it seems unlikely that we will - what exactly would you expect
the created view to look like? I assume you think we'd change it so the
view references the value you supplied as a parameter as a literal
value? That seems like it'd be quite a bit of magic.

Greetings,

Andres Freund



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15927: PGresult *PQexecParams(..) not work on view
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15928: Message no longer displaying rows affected with insert and update statements