Re: libpq5 8.3 breaks 8.2 compatibility with encodings - Mailing list pgsql-bugs

From Martin Pitt
Subject Re: libpq5 8.3 breaks 8.2 compatibility with encodings
Date
Msg-id 20071012161845.GK5911@piware.de
Whole thread Raw
In response to Re: libpq5 8.3 breaks 8.2 compatibility with encodings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi,

Tom Lane [2007-10-12 11:50 -0400]:
> Martin Pitt <martin@piware.de> writes:
> > Ah, got it. The ordering in pg_enc2name_tbl[] changed, which makes the
> > indices jump around.
>=20
> Sorry, you don't get to put JOHAB back into the portion of the list that
> is backend-legal encodings.

Ah, the PG_ENCODING_BE_LAST magic.

> It's a bit nasty that this enum is exposed as part of the ABI, but I'm
> afraid we may be stuck with that decision.

Well, then I see two options for 8.3:

 (1) Change the PG_ENCODING_IS_CLIENT_ONLY and PG_VALID_BE_ENCODING
 macros to expliticy disallow encodings which have become client-only
 while soname is not bumped. This is a bit ugly, but should work until
 the table gets restructured to have a per-locale flag of
 internal/clientonly, or the mapping stops being index-based.

 I'm happy to check all 9 other places where pg_enc is used for
 whether they need adaptions for dropped JOHAB (i. e. make assumptions
 about the structure without using above macros).

 (2) Bump the soname. That's definitively a huge PITA for
 distributors, but it's still better than silently breaking the ABI.

So, with my distro hat on I'd definitively prefer (1), but if you want
(2) for cleanliness' sake, we have to follow and bite the bullet. But
we can't just let it stay like this.

Thank you, and have a good weekend!

Martin

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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq5 8.3 breaks 8.2 compatibility with encodings
Next
From: Peter Eisentraut
Date:
Subject: Re: libpq5 8.3 breaks 8.2 compatibility with encodings