Re: pgConn.cpp.patch

Поиск
Список
Период
Сортировка
От Adam H. Pendleton
Тема Re: pgConn.cpp.patch
Дата
Msg-id 3EF9A621.3050201@fmonkey.net
обсуждение исходный текст
Ответ на Re: pgConn.cpp.patch  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgadmin-hackers
Dave Page wrote:
 
-----Original Message-----
From: Adam H.Pendleton [mailto:fmonkey@fmonkey.net] 
Sent: 25 June 2003 03:02
To: pgadmin-hackers@postgresql.org
Subject: [pgadmin-hackers] pgConn.cpp.patch


This patch fixes a bug in the error reporting of the new connection 
dialog when setting the database encoding.   
Hi Adam,

I don't believe this patch is correct. PQsetClientEncoding returns 0 on
success and -1 on failure [1], therefore !PQsetClientEncoding is true
upon success.
 
The docs may say that, but I can tell you that:

if (PQsetClientEncoding(conn, "SQL_ASCII"))
           wxLogError(wxT("%s"), PQerrorMessage(conn));

causes wxLogError to be run, if there was an error in the connection.  For example, try connecting to a postgres database with an incorrect password.  You will get *two* password incorrect dialogs.  The first is displayed by the above code.

ahp


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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [pgadmin-support] PGA 3 Copy
Следующее
От: Jean-Michel POURE
Дата:
Сообщение: Re: [pgadmin-support] PGA 3 Copy