Re: libpq5 8.3 breaks 8.2 compatibility with encodings

Поиск
Список
Период
Сортировка
От Martin Pitt
Тема Re: libpq5 8.3 breaks 8.2 compatibility with encodings
Дата
Msg-id 20071012161845.GK5911@piware.de
обсуждение исходный текст
Ответ на Re: libpq5 8.3 breaks 8.2 compatibility with encodings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq5 8.3 breaks 8.2 compatibility with encodings
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq5 8.3 breaks 8.2 compatibility with encodings