On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka <mlanka@avineonindia.com> 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@gmail.com Skype: gray-hemp Phone: +79160686204