set_client_encoding is broken - Mailing list pgsql-hackers

From Zdenek Kotala
Subject set_client_encoding is broken
Date
Msg-id 1251702333.1312.63.camel@localhost
Whole thread Raw
Responses Re: set_client_encoding is broken
List pgsql-hackers
If you look on gothic_moth and comet_moth

http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=gothic_moth&dt=2009-08-30%2020:06:00
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=comet_moth&dt=2009-08-29%2021:06:00

you can see following error:

../../src/test/regress/pg_regress --inputdir=.
--psqldir=/zfs_data/home/postgres/buildfarm/gothic_moth/HEAD/inst/bin
--dbname=contrib_regression --multibyte=UTF8 --no-locale  unaccent
(using postmaster on Unix socket, default port)
============== dropping database "contrib_regression" ==============
psql: FATAL:  invalid value for parameter "client_encoding": "UTF8"
command failed: "/zfs_data/home/postgres/buildfarm/gothic_moth/HEAD/inst/bin/psql" -X -c "DROP DATABASE IF EXISTS
\"contrib_regression\"""postgres"
 
gmake[1]: *** [installcheck] Error 2
gmake[1]: Leaving directory `/zfs_data/home/postgres/buildfarm/gothic_moth/HEAD/pgsql.4092/contrib/unaccent'


[4a9ae815.696e:1] LOG:  connection received: host=[local]
[4a9ae815.696e:2] LOG:  connection authorized: user=postgres database=postgres
[4a9ae815.696e:3] LOG:  conversion between UTF8 and LATIN2 is not supported
[4a9ae815.696e:4] FATAL:  invalid value for parameter "client_encoding": "UTF8"

The assign_client_encoding->SetClientEncoding fails to find conversion function.
http://doxygen.postgresql.org/backend_2commands_2variable_8c.html#7f2d0624e7b7fb46644c5ce284e6479c
http://doxygen.postgresql.org/mbutils_8c.html#8eeff4ecab443ba7073c426fcd4bc4d6

I guess that flat auth file patch
http://archives.postgresql.org/pgsql-committers/2009-08/msg00301.php
is culprint.

It seems that backend does not have loaded pg_encoding yet when
SetClientEncoding is processed.
Zdenek




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Tightening binary receive functions
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: LWLock Queue Jumping