Thread: [FEATURE REQUEST] select encoding for logs reader
Hi all
Thanks & Regards,
Bartek
I have a proposition of a new feature: select of encoding which is used by logs reader in server status window. It looks like pgAdmin assumes UTF8, so sometimes gives an error.
It is possible to read files with different encoding via postgres:
eg:
SELECT convert_from(pg_read_binary_file('pg_log/postgresql-2012-12-07_000000.log', 0, 2000), 'WIN1250');
this is based on my post on pg_general list (http://archives.postgresql.org/pgsql-general/2012-12/msg00164.php)
Thanks & Regards,
Bartek
On Mon, Dec 10, 2012 at 8:25 AM, Bartosz Dmytrak <bdmytrak@gmail.com> wrote: > Hi all > I have a proposition of a new feature: select of encoding which is used by > logs reader in server status window. It looks like pgAdmin assumes UTF8, so > sometimes gives an error. > It is possible to read files with different encoding via postgres: > eg: > SELECT > convert_from(pg_read_binary_file('pg_log/postgresql-2012-12-07_000000.log', > 0, 2000), 'WIN1250'); That's easy enough, but the real issue is that the log files can contain data in multiple encodings, because messages are written using whatever encoding is used in each database, not one global one. It's pretty horrible - and there's no way (that I've ever figured out) for pgAdmin to safely deal with it. In your case, we'd be even more stuck, as I see from the link you posted that all your databases are in UTF-8 - so that's almost certainly what any code we wrote would expect the logs to be in (in which case, it also seems odd that UTF-8 doesn't actually work for you). -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi,
In my case WIN1250 works "fine" - only works, but not fine :) Still, there is no option to change encoding of logs reader.
Regards,
Bartek
Totally agree: DBs encoding (and log line) could be different, but this feature will give user option to try.
Regards,
Bartek