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