That's a much better answer than mine!
Take this advice! ;)
Cheers
Sergey Konoplev ---20/07/2012 08:29:18---On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka <mlanka@xxxxxxxxxxxxxxxx> wrote: > I am getting the fol
From: Sergey Konoplev <sergey.konoplev@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: mlanka@xxxxxxxxxxxxxxxx,
Cc: pgsql-admin@xxxxxxxxxxxxxx
Date: 20/07/2012 08:29
Subject: Re: ERROR: there is no parameter $1
Sent by: pgsql-admin-owner@xxxxxxxxxxxxxx
On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka <mlanka@xxxxxxxxxxxxxxxx> 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 p.password = $2;' USING pname, ppassword
--
Sergey Konoplev
a database architect, software developer at PostgreSQL-Consulting.com
http://www.postgresql-consulting.com
Jabber: gray.ru@xxxxxxxxx Skype: gray-hemp Phone: +79160686204
--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
============================================= Romax Technology Limited Rutherford House Nottingham Science & Technology Park Nottingham, NG7 2PZ England Telephone numbers: +44 (0)115 951 88 00 (main) For other office locations see: http://www.romaxtech.com/Contact ================================= =============== E-mail: info@xxxxxxxxxxxxx Website: www.romaxtech.com ================================= ================ Confidentiality Statement This transmission is for the addressee only and contains information that is confidential and privileged. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please delete from your system and contact the sender. Thank you for your cooperation. =================================================