Re: pgConn.cpp.patch

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

Dave Page wrote:
Doh!  Of course it fails.  Well, at least this saves me from having to figure out what I missed.  BTW, if PQsetClientEncoding fails, which it does, then why would the error come up as a password error?   
 
I think it's because libpq is clever enough to keep the 'real' error rather than just say that the encoding couldn't be set. This makes sense if you think about it, because normally the client encoding will fail to get set if an invaid encoding is chosen - this can only be discovered when the connection is present.
 
 Does that mean that PQsetClientEncoding doesn't change the Postgres errors like other PQ functions?

 
No. If it gets a real error, then you will see it. Try changing the 'UNICODE' to 'SOMETHINGELSE' and logging in. Note that in this case you may still see 2 sequential error messages - 1 as the master connection is established, then a second for whichever database auto-reopens (and of course, subsequent db opens). 
 
Regards, Dave.
 
 

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

Предыдущее
От: "Adam H. Pendleton"
Дата:
Сообщение: Re: pgConn.cpp.patch
Следующее
От: Jean-Michel POURE
Дата:
Сообщение: Localisation strings