Re: Determine Client Encoding

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com>
Cc: PostgreSql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Determine Client Encoding
Date: 2014-02-26 14:48:12
Message-ID: 27744.1393426092@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= <l(dot)rame(at)griensu(dot)com> writes:
> Hi, we found characters with different enconding in our database. As our
> system is accessed by many PCs I would like to know if it's possible to
> know the encoding of each connection, without going to each PC to check
> its connection string.

If you mean can one session identify the client_encoding of another
session, no; that information isn't exposed anyplace. Within a session,
you can of course use "show client_encoding" or various equivalent
syntaxes.

Note that when you have encoding problems, as often as not the issue
is that the data the client is sending isn't really in the encoding
its client_encoding setting claims. So even if you could find that
out remotely, it probably wouldn't help localize the issue very well.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leonardo M. Ramé 2014-02-26 15:14:25 Re: Determine Client Encoding
Previous Message Leonardo M. Ramé 2014-02-26 13:16:02 Determine Client Encoding