Re: Bad macro in pg_wchar.h?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bad macro in pg_wchar.h?
Дата
Msg-id 200306021859.h52IxVQ10235@candle.pha.pa.us
обсуждение исходный текст
Ответ на Bad macro in pg_wchar.h?  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-hackers
Patch applied. Thanks.

---------------------------------------------------------------------------

Oliver Elphick wrote:
> In src/include/mb/pg_wchar.h we have:
>
> #define PG_ENCODING_BE_LAST PG_ISO_8859_8
> #define PG_ENCODING_FE_LAST PG_WIN1256
>
> but the last client encoding in the enum list is actually PG_GB18030 and
> it seems that
>
> #define PG_ENCODING_IS_CLIEN_ONLY(_enc) \
>                 (((_enc) > PG_ENCODING_BE_LAST && (_enc) <= PG_ENCODING_FE_LAST)
>
> can never be true.
>
> I think the define should read
> #define PG_ENCODING_FE_LAST PG_GB18030
>
> On the other hand, perhaps no-one cares, because
> PG_ENCODING_IS_CLIEN_ONLY is never used.
>
> --
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight, UK                             http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "O come, let us worship and bow down; let us kneel
>       before the LORD our maker."          Psalms 95:6
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/include/mb/pg_wchar.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/mb/pg_wchar.h,v
retrieving revision 1.45
diff -c -c -r1.45 pg_wchar.h
*** src/include/mb/pg_wchar.h    19 Feb 2003 14:31:26 -0000    1.45
--- src/include/mb/pg_wchar.h    2 Jun 2003 18:55:39 -0000
***************
*** 190,196 ****
  } pg_enc;

  #define PG_ENCODING_BE_LAST PG_ISO_8859_8
! #define PG_ENCODING_FE_LAST PG_WIN1256

  /*
   * Please use these tests before access to pg_encconv_tbl[]
--- 190,196 ----
  } pg_enc;

  #define PG_ENCODING_BE_LAST PG_ISO_8859_8
! #define PG_ENCODING_FE_LAST PG_GB18030

  /*
   * Please use these tests before access to pg_encconv_tbl[]

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Status during copy [patch]
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Logging (was Re: Suggestion GRANT ALTER, TRIGGER ON ALTER)