Re: [ADMIN] ERROR: there is no parameter $1

2012-07-20 Thread Bill MacArthur
On 7/19/2012 10:33 PM, Madhu.Lanka wrote: Hi Friends I am creating the function like CREATE OR REPLACE FUNCTION getrowstest3(pname character varying,ppassword character varying) RETURNS SETOF getrows AS $BODY$ declare r getrows; begin for r in EXECUTE 'select u.role_id,u.user_id,p

Re: [ADMIN] ERROR: there is no parameter $1

2012-07-20 Thread Martin French
That's a much better answer than mine! Take this advice!  ;)CheersSergey Konoplev ---20/07/2012 08:29:18---On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka wrote: > I am getting the folFrom:Sergey Konoplev To:mla...@avineonindia.com, Cc:pgsql-admin@postgresql.orgDate:20

Re: [ADMIN] ERROR: there is no parameter $1

2012-07-19 Thread Martin French
Hi pgsql-admin-ow...@postgresql.org wrote on 20/07/2012 03:33:36:> From: "Madhu.Lanka" > To: , > Date: 20/07/2012 06:37> Subject: [ADMIN] ERROR:  there is no parameter $1> Sent by: pgsql-admin-ow...@postgresql.org> > Hi Friends>  > I am creating the function

Re: [ADMIN] ERROR: there is no parameter $1

2012-07-19 Thread Sergey Konoplev
On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka wrote: > I am getting the following error > > ERROR: there is no parameter $1 > LINE 5: r.role_id = u.role_id and p.name= $1 and p.password = $2 Because they are not expanding inside strings. Use EXECUTE ... USING ... EXECUTE '... and p.name =$1 and

[ADMIN] ERROR: there is no parameter $1

2012-07-19 Thread Madhu.Lanka
Hi Friends I am creating the function like CREATE OR REPLACE FUNCTION getrowstest3(pname character varying,ppassword character varying) RETURNS SETOF getrows AS $BODY$ declare r getrows; begin for r in EXECUTE 'select u.role_id,u.user_id,p.name,p.creation_date,p.telephone_number,