dbTalk Databases Forums  

[BUGS] Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default [BUGS] Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char - 07-29-2006 , 05:35 AM







--adJ1OR3c6QgCpb/j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 (AT) debian (DOT) org> -----

Subject: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char
Reply-To: Matej Vela <vela (AT) debian (DOT) org>, 380047 (AT) bugs (DOT) debian.org
=46rom: Matej Vela <vela (AT) debian (DOT) org>
To: submit (AT) bugs (DOT) 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?

--adJ1OR3c6QgCpb/j
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEyzmEDecnbV4Fd/IRAjXNAJ0b4Q/giJfeAV85Sg36z4yOSx2zwgCfb+J/
6jY4vUPF1xUvwVdQS7aBQws=
=rxQU
-----END PGP SIGNATURE-----

--adJ1OR3c6QgCpb/j--

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: [BUGS] Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char - 07-29-2006 , 08:44 PM






Martin Pitt wrote:

Hi,

Quote:
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?
This function has been defined in pg_wchar.h for a long time, and is
certainly not deprecated. OTOH I don't think it makes much sense to put
that function declaration in libpq-fe.h, because it's not exclusive of
frontends.

The correct solution seems to be that the libpq-dev package must include
mb/pg_wchar.h. Not sure how reasonable that is for your package set; if
there's a package with the rest of the headers, probably it'll have to
depend on libpq-dev or something.


Quote:
[1] http://bugs.debian.org/18858
I find this one more closely related to the topic at hand:

http://bugs.debian.org/318858

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: [BUGS] Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char - 07-30-2006 , 04:12 AM




--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Alvaro,

Alvaro Herrera [2006-07-29 21:41 -0400]:
Quote:
The correct solution seems to be that the libpq-dev package must include
mb/pg_wchar.h. =20
Many thanks for your explanations. This is trivial to do.

Quote:
[1] http://bugs.debian.org/18858
=20
I find this one more closely related to the topic at hand:
=20
http://bugs.debian.org/318858
Erm, yes, yay for my typos. :/=20
/me looks on the floor for a dropped '3'.

Have a nice Sunday,

Martin

--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org

--bp/iNruPH9dso1Pn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEzHKuDecnbV4Fd/IRApZoAJ44HcZsYBf5Vmt8tkN6Gvh8I7EZqACfbT5a
tsg/HSNZJKUbkuask3AxKuA=
=jzpz
-----END PGP SIGNATURE-----

--bp/iNruPH9dso1Pn--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.