PostgreSQL need to explicitly specify the client code?

The server is a UTF8,

Then the client Is it right? Also need to specify what? Looks like the Google up, no one in the specified.

In accordance with the relevant contents of the document:

It is not required.

There is a problem, if the server is a UTF8 encoding, so all my select out of the data are UTF8 on the client side, so I should be to identify? Will appear garbled?

Started by Abner at June 15, 2016 - 11:11 AM

Note: I do now with Perl database, the main use of DBI, when using Perl DBI to connect to MySQL, need to set up the client code, otherwise it will appear garbled.
  1. $dbh = DBI->connect("dbi:mysql:$database:$hostname", $username, $userpass);
  2. $dbh->do("set character_set_client = 'utf8'");
  3. $dbh->do("set character_set_connection = 'utf8'");
  4. $dbh->do("set character_set_results = 'utf8'");
I don't know when to connect to the PostgreSQL need not to need to do a similar set.

Posted by Abner at June 30, 2016 - 11:12 AM

According to the bottom of the page. Content, seems to set

Posted by Abner at July 12, 2016 - 12:07 PM

SET client_encoding TO environment code should be set to the client, the drive (such as pgjdbc, npgsql) will set their own internal, need not worry.

Posted by Saxon at July 15, 2016 - 12:15 PM

Thank you.

Posted by Abner at July 22, 2016 - 12:16 PM