Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char
От | Martin Pitt |
---|---|
Тема | Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char |
Дата | |
Msg-id | 20060729103340.GC5184@piware.de обсуждение исходный текст |
Ответы |
Re: Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char
|
Список | pgsql-bugs |
Hi PostgreSQL developers, I recently got this bug report about a missing declaration of pg_encoding_to_char() in the official client library headers (PostgreSQL 8.1.4). This causes some build problems of depending packages like the ruby bindings [1]. So, should this function be declared in libpq-fe.h (or pg_wchar.h included into the postgresql client development package), or is this function obsolete? Thank you! Martin [1] http://bugs.debian.org/18858 ----- Forwarded message from Matej Vela <vela@debian.org> ----- Subject: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char Reply-To: Matej Vela <vela@debian.org>, 380047@bugs.debian.org From: Matej Vela <vela@debian.org> To: submit@bugs.debian.org Date: Thu, 27 Jul 2006 06:45:37 +0200 X-Spam-Status: No, score=3D2.7 required=3D4.0 tests=3DAWL,BAYES_50, DATE_IN_FUTURE_06_12 autolearn=3Dno version=3D3.0.3 Package: libpq-dev Version: 8.1.4-5 Chapter 21.2.3 ("Automatic Character Set Conversion Between Server and Client") documents several functions: int PQsetClientEncoding(PGconn *conn, const char *encoding); where conn is a connection to the server, and encoding is the encoding you want to use. If the function successfully sets the encoding, it returns 0, otherwise -1. The current encoding for this connection can be determined by using: int PQclientEncoding(const PGconn *conn); Note that it returns the encoding ID, not a symbolic string such as EUC_JP. To convert an encoding ID to an encoding name, you can use: char *pg_encoding_to_char(int encoding_id); The first two are declared in <libpq-fe.h>, but pg_encoding_to_char() seems to be in <mb/pg_wchar.h>, which is not included in the package. If this interface is private or deprecated, consider this a documentation bug. Thanks, Matej ----- End forwarded message ----- --=20 Martin Pitt http://www.piware.de Ubuntu Developer http://www.ubuntu.com Debian Developer http://www.debian.org In a world without walls and fences, who needs Windows and Gates?
В списке pgsql-bugs по дате отправления: