Stephan Szabo wrote:
>
> On Sat, 3 Jul 2004, Dennis Gearon wrote:
>
>
>>Stephan Szabo wrote:
>>
>>>On Sat, 3 Jul 2004, Dennis Gearon wrote:
>>>
>>>
>>>
>>>>Please CC me:
>>>>
>>>>If I create the user 'web_user'
>>>>with password 'password'
>>>>I can connect using 'psql' just fine.
>>>>
>>>>If I create the user 'D1Khb2g5m7FGk_web_user'
>>>>with password 'password'
>>>>I CANNOT connect using 'psql', I get authentication error.
>>>
>>>
>>>Are you sure that you're not just running into a case problem
>>>with case folded names (non-quoted names from sql statements) versus
>>>non-case folded names (programs which treat their arguments as quoted like
>>>psql).
>>>
>>
>>I am putting the exact same string into both situations:
>>
>> A/ creating the username
>
>
> How did you create the user. Did you use the shell script or a create
> user statement from inside a session in the database?
>
>
>> B/ trying to log in.
>>
>>If the database is not going to respect case in one, it shouldn't
>>respect case in the other, right?
>
>
> IIRC, psql (and the createuser shell script and such) treat it as if you
> had double quoted its argument because of the way shells handle quotes
> which would necessitate something like '"FOO"' to use a quoted uppercase
> name. So, if you say psql FOO -U BAR, you're saying log into database
> "FOO" as user "BAR".
>
>
I created the user from inside of a psql session.
And I cannot either connect from invoking a different psql session from the shell,
nor from PHP using it's compiled in c library for postgres.
It seems it's another gotcha with this database. I wouldn't have thought it would so difficult to insert upper(whatever
wasenterd) into the database, and validate it the same way.