Thread: BUG #3271: PREPARE/EXCUTE don't work
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
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
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