pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15927: PGresult *PQexecParams(..) not work on view
2+ messages / 2 participants
[nested] [flat]
* BUG #15927: PGresult *PQexecParams(..) not work on view
@ 2019-07-26 18:11 PG Bug reporting form <noreply@postgresql.org>
2019-07-26 18:21 ` Re: BUG #15927: PGresult *PQexecParams(..) not work on view Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2019-07-26 18:11 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: pm_fon@mail.ru
The following bug has been logged on the website:
Bug reference: 15927
Logged by: Vladimir Dobrokhotov
Email address: pm_fon@mail.ru
PostgreSQL version: 10.1
Operating system: freebsd 11.1
Description:
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
(there are no restrictions on specific commands in the documentation)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15927: PGresult *PQexecParams(..) not work on view
2019-07-26 18:11 BUG #15927: PGresult *PQexecParams(..) not work on view PG Bug reporting form <noreply@postgresql.org>
@ 2019-07-26 18:21 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 2+ messages in thread
From: Andres Freund @ 2019-07-26 18:21 UTC (permalink / raw)
To: PG Bug reporting form <noreply@postgresql.org>; +Cc: pgsql-bugs@lists.postgresql.org; pm_fon@mail.ru
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-07-26 18:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 18:11 BUG #15927: PGresult *PQexecParams(..) not work on view PG Bug reporting form <noreply@postgresql.org>
2019-07-26 18:21 ` Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox