From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Phil Endecott" <spam_from_postgresql_bugs(at)chezphil(dot)org> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3002: PQexecParams only supports some commands; needs improved error reporting, documenting or fixing |
Date: | 2007-02-14 07:39:19 |
Message-ID: | 19059.1171438759@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg범퍼카 토토SQL : Postg범퍼카 토토SQL 메일 링리스트 : 2007-02-14 이후 PGSQL-BUGS 07:39 |
"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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-14 07:54:10 | Re: BUG #2996: to_char( timestamp, 'DD-Mon-YYYY HH24:MI:SS.MS' ) reports .1000 ms |
Previous Message | Tom Lane | 2007-02-14 07:30:39 | Re: BUG #3000: Linking problem |