Hi,

Tom Lane [2007-10-12 11:50 -0400]:
> Martin Pitt <[EMAIL PROTECTED]> writes:
> > Ah, got it. The ordering in pg_enc2name_tbl[] changed, which makes the
> > indices jump around.
> 
> 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

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

Attachment: signature.asc
Description: Digital signature

Reply via email to