|
From: SourceForge.net <no...@so...> - 2010-08-26 19:45:50
|
Bugs item #1832169, was opened at 2007-11-15 02:15 Message generated for change (Comment added) made by ioguix You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=418980&aid=1832169&group_id=37132 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Mo DeJong (mdejong) >Assigned to: Guillaume `ioguix` de Rorthais (ioguix) Summary: Patch to use pg_set_client_encoding Initial Comment: The attached patch will use pg_set_client_encoding if supported, then it will fall back to an SQL statement. This came up while working on getting phppgadmin working under Quercus + Resin. Also, the logic that just exits when the client encoding can't be set is not quite right. There are cases, like with a JDBC client for Postgres where the client encoding can only be set to UNICODE. So, exiting if that fails is not the best thing to do. cheers Mo ---------------------------------------------------------------------- >Comment By: Guillaume `ioguix` de Rorthais (ioguix) Date: 2010-08-26 21:45 Message: Hello, Yeah, we are realyl late to answer bug report ;) So, I'm not sure to understand clearly what's the point here. Using the PHP function "pg_set_client_encoding" really means to execute the libpq PQsetClientEncoding function, which in turn...execute the same query than us. From pg sources: int PQsetClientEncoding(PGconn *conn, const char *encoding) { [...] static const char query[] = "set client_encoding to '%s'"; [...] So, unless you are talking about shortcutting the adodb layer for someobscure performance reasons, I don't understand what is the purpose here. Moreover, it just add some more tests block...So I would vote no here, unless you have a better argument I didn't thought about ? Thank you for your report and patch anyway ! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=418980&aid=1832169&group_id=37132 |