Re: Invalid password for \ and ' characters

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Invalid password for \ and ' characters
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C95B8@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на Invalid password for \ and ' characters  ("Andrus Moor" <eetasoft@online.ee>)
Список pgadmin-support

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of
> Andreas Pflug
> Sent: 19 March 2006 11:19
> To: Andrus Moor
> Cc: pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] Invalid password for \ and ' characters
>
> Andrus Moor wrote:
> > If password set by pgadmin contains \ or ' character, it is
> not possible to
> > login to pgAdmin
> >
> > PROBLEM WITH \ character is password
> >
> > To reproduce
> >
> > 1. Create new login role in pgadmin
> > 2. Enter \ to password field.
> > 3. Select SQL tab
> >
> > Observed:
> >
> > CREATE ROLE test LOGIN PASSWORD '\\'
> >
> > Expected
> >
> > CREATE ROLE test LOGIN PASSWORD '\'
> >
> > Postres does NOT require backslashes in password strings.
> > PgAdmin probably uses its qtString for password strings.
>
> AFAIR Dave recently changed that. Please check the CHANGELOG
> and try a
> newer version.

Yes, I did, but that was for the logon code where the rules of libpq are
observed rather than SQL.

As per the example given, Andrus has it backwards. The password string
in PostgreSQL is just like any other string and will always require that
quotes and backslashes are escaped. Note in psql, how the prompt shows
the string is to be completed if a backslash is not quoted:

postgres=> alter role dpage with password '\';
postgres'>

Regards, Dave.


В списке pgadmin-support по дате отправления:

Предыдущее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: Help
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Mac version can't dump/restore