Re: pgConn.cpp.patch

Поиск
Список
Период
Сортировка
Искать
От
Adam H. Pendleton
Тема
Re: pgConn.cpp.patch
Дата
Msg-id
3EF9A621.3050201@fmonkey.net
Ответ на
Список
Дерево обсуждения
pgConn.cpp.patch Adam H.Pendleton <fmonkey@fmonkey.net>
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
Дата:
От: Jean-Michel POURE
Дата:
FAQ