PQconndefaults() error, don't show PGCLIENTENCODING - Mailing list pgsql-bugs

From Pavel Stehule
Subject PQconndefaults() error, don't show PGCLIENTENCODING
Date
Msg-id Pine.LNX.4.44.0401121359090.11203-100000@kix.fsv.cvut.cz
Whole thread Raw
List pgsql-bugs
Hello

    I work on small patch for pg_dump, which adds information about
used encoding into dump file. I can get current encoding via SQL "SHOW
client_encoding", but I can (propably) PQconndefaults too? Is it true?

I wrote small program which show env vars from PQconninfoOption struct.
But env PGCLIENTENCODING didn't showed? Maybe its error?

[stehule@stehule public_html]$ set|grep PG
PGCLIENTENCODING=windows1250
PGDATABASE=testdb011
[stehule@stehule public_html]$ ./testcninfo
[stehule@stehule public_html]$ ./testcninfo
PGAUTHTYPE=
PGSERVICE=(null)
PGUSER=stehule
PGPASSWORD=(null)
PGCONNECT_TIMEOUT=(null)
PGDATABASE=testdb011
PGHOST=(null)
PGHOSTADDR=(null)
PGPORT=5432
PGTTY=
PGOPTIONS=
PGSSLMODE=disable

Next questions? I don't think so I can use  PQconndefaults for getting
informations about current connection now. Can I get this informations
by different way than sql?

Regards

Pavel Stehule

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: data loss after vacuum
Next
From: Kris Jurka
Date:
Subject: Assertion failure in current cvs