Re: [GENERAL] "no value found for parameter 1" error for query with no parameters

2007-02-11 Thread Joshua D. Drake
Peter Eisentraut wrote: > Phil Endecott wrote: >> I converted the first query like this: >> >> create or replace temporary view u_messages as >>select * from messsages where owner=$1; > > What makes you think this should work? Phil, You would do this: create view u_messages as sele

Re: [GENERAL] "no value found for parameter 1" error for query with no parameters

2007-02-11 Thread Peter Eisentraut
Phil Endecott wrote: > I converted the first query like this: > > create or replace temporary view u_messages as >select * from messsages where owner=$1; What makes you think this should work? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(

[GENERAL] "no value found for parameter 1" error for query with no parameters

2007-02-11 Thread Phil Endecott
Dear All, I have recently been converting some old code to use $n parameter placeholders, rather than inlining the values in the query string. It has mostly gone well, but I have encountered some odd behaviour with a temporary view. I'm using libpq to talk to an 8.1.0 server. This is the ol