Hi,

I first didn't get what was happening, and I had to think about it for a
while. On my test server, I had no issue, but on the automatic rebuild,
it wasn't working.

Then on this very nice Saturday evening, having a break on my balcony, I
suddenly understood.

What's happening is that the test script is using:

MYUSER=`whoami`

then uses ${MYUSER} to create the pgsql user. But in the automatic
rebuild, whoami returns "user" (eg: the Unix username of the test
environment is "user"), which is a reserved keyword of pgsql, thus the
syntax error.

The solution is to escape it during the query, and replace this:
psql -e -c "ALTER USER ${MYUSER} WITH PASSWORD 'abcdefg'"

by this:
psql -e -c "ALTER USER \"${MYUSER}\" WITH PASSWORD 'abcdefg'"

and then the ALTER statement works as expected on any situation, I
believe. I'm now uploading this change.

Cheers,

Thomas



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to