"Phil Endecott" <spam_from_postgresql_bugs(at)chezphil(dot)org> writes:
> I understand that PQexecParams may only be used for SELECT, INSERT, DELETE
> and UPDATE commands, but not for other commands where parameter substitution
> might be useful such as CREATE VIEW and CREATE TABLE AS SELECT. When I used
> PQexecParams with CREATE VIEW with one $ parameter I got no error
> immediately, but got a "no value found for parameter 1" error when I later
> ran a query that used the view.
As near as I can tell, your issue is that you haven't thought carefully
about what "$1" in a CREATE VIEW *means*. Is it supposed to represent a
constant value bound into the view when it's created? Is it supposed to
represent a value supplied whenever the view is used (if so, how do you
disambiguate when the query calling the view uses $1 for its own
purposes?). Or something else?
Given defensible arguments for a particular answer to these definitional
questions, we might think about implementing something, but right now my
instinct is to not go there. I'm not seeing a use-case that would
justify work on this.
regards, tom lane
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2007-02-14 07:54:10|
|Subject: Re: BUG #2996: to_char( timestamp, 'DD-Mon-YYYY HH24:MI:SS.MS' ) reports .1000 ms |
|Previous:||From: Tom Lane||Date: 2007-02-14 07:30:39|
|Subject: Re: BUG #3000: Linking problem |