Skip site navigation (1) Skip section navigation (2)

Re: ERROR: there is no parameter $1

From: "Martin French" <Martin(dot)French(at)romaxtech(dot)com>
To: Sergey Konoplev <sergey(dot)konoplev(at)postgresql-consulting(dot)com>
Cc: mlanka(at)avineonindia(dot)com,pgsql-admin(at)postgresql(dot)org,pgsql-admin-owner(at)postgresql(dot)org
Subject: Re: ERROR: there is no parameter $1
Date: 2012-07-20 07:30:47
Message-ID: OFA46B5BB3.2AC90BE7-ON80257A41.00293CB6-80257A41.00294565@LocalDomain (view raw or flat)
Thread:
Lists: pgsql-admin
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(at)avineonindia(dot)com wrote:  I am getting the
fol



From: Sergey Konoplev
sergey(dot)konoplev(at)postgresql-consulting(dot)com

To: mlanka(at)avineonindia(dot)com,

Cc: pgsql-admin(at)postgresql(dot)org

Date: 20/07/2012
08:29

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

Sent by: pgsql-admin-owner(at)postgresql(dot)org








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



--

Sent via pgsql-admin mailing list
(pgsql-admin(at)postgresql(dot)org)

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(at)romaxtech(dot)com 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.
=================================================

In response to

pgsql-admin by date

Next:From: Bill MacArthurDate: 2012-07-20 12:50:43
Subject: Re: ERROR: there is no parameter $1
Previous:From: Martin FrenchDate: 2012-07-20 06:34:15
Subject: Re: ERROR: there is no parameter $1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group