Re: libpq5 8.3 breaks 8.2 compatibility with encodings

From: Martin Pitt <martin(at)piware(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: libpq5 8.3 breaks 8.2 compatibility with encodings
Date: 2007-10-12 16:18:45
Message-ID: 20071012161845.GK5911@piware.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Tom Lane [2007-10-12 11:50 -0400]:
> Martin Pitt <martin(at)piware(dot)de> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2007-10-12 16:20:01 Re: libpq5 8.3 breaks 8.2 compatibility with encodings
Previous Message Tom Lane 2007-10-12 16:02:44 Re: libpq5 8.3 breaks 8.2 compatibility with encodings