Re: BUG #3271: PREPARE/EXCUTE don't work

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: laurent faillie <l_faillie(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3271: PREPARE/EXCUTE don't work
Date: 2007-05-11 15:53:36
Message-ID: 46449180.1040302@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

laurent faillie wrote:
> While trying to use Apache 2.2 database authentication, I discovered that I
> wasn't able to retrieve users. After some investigation, I found that
> PREPARE/EXECUTE are faulty. It can be reproduced in psql as bellow :
>
> www=> PREPARE authn_dbd_1 (varchar) AS select mdp from mariage.comptes where
> nom = '$1';

That $1 should be without the quotes, like this:

PREPARE authn_dbd_1 (varchar) AS select mdp from mariage.comptes where
nom = $1

Otherwise the query looks for a user named '$1'.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2007-05-11 19:10:58 Re: BUG #3270: limit < 16 optimizer behaviour
Previous Message laurent faillie 2007-05-11 15:05:23 BUG #3271: PREPARE/EXCUTE don't work