Re: pgConn.cpp.patch

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Adam H(dot)Pendleton" <fmonkey(at)fmonkey(dot)net>, <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgConn.cpp.patch
Date: 2003-06-25 07:39:02
Message-ID: 03AF4E498C591348A42FC93DEA9661B83AF134@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> -----Original Message-----
> From: Adam H.Pendleton [mailto:fmonkey(at)fmonkey(dot)net]
> Sent: 25 June 2003 03:02
> To: pgadmin-hackers(at)postgresql(dot)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.

- if (PQsetClientEncoding(conn, "UNICODE"))
+ if (!PQsetClientEncoding(conn, "UNICODE"))
wxLogError(wxT("%s"), wxString(PQerrorMessage(conn),
wxConvUTF8).c_str());

Patch NOT applied.

Regards, Dave.

[1]
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=multibyt
e.html

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2003-06-25 07:54:05 Re: frmQueryBuilder.patch
Previous Message Jean-Michel POURE 2003-06-25 07:23:23 Re: Request for translation of pgAdmin3 into Traditional Chinese