BUG #3271: PREPARE/EXCUTE don't work

Started by Laurent FAILLIEalmost 19 years ago3 messagesbugs
Jump to latest
#1Laurent FAILLIE
l_faillie@yahoo.com

The following bug has been logged online:

Bug reference: 3271
Logged by: laurent faillie
Email address: l_faillie@yahoo.com
PostgreSQL version: 8.2.4
Operating system: HP-UX 11.11 (v32 bits).
Description: PREPARE/EXCUTE don't work
Details:

Hi all,

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';
PREPARE
www=> execute authn_dbd_1 ('Test');
mdp
-----
(0 rows)

www=> select mdp from mariage.comptes where nom = 'Test';
mdp
---------------
xxxxxxx
(1 row)

The problem was also in 8.2.3.

Best regards,

Laurent

#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Laurent FAILLIE (#1)
Re: BUG #3271: PREPARE/EXCUTE don't work

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

#3Laurent FAILLIE
l_faillie@yahoo.com
In reply to: Heikki Linnakangas (#2)
RE : Re: BUG #3271: PREPARE/EXCUTE don't work

Hi Heikki,

--- Heikki Linnakangas <heikki@enterprisedb.com> a
�crit :

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'.

Ok, it's working, thanks a log.
So, Apache DBD module is faulty, I will try to solve
out this issue and revert it back to apache team.

Thanks agains.

Laurent

The misspelling master is on the Web.
_________ 100 % Dictionnary Free !
/ /(
/ Dico / / Pleins d'autres fautes sur
/________/ /
(#######( / http://destroyedlolo.homeunix.org
Quoi, des fautes d'orthographe! Pas possible ;-D.

_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail