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