Bad macro in pg_wchar.h?

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Bad macro in pg_wchar.h?
Date: 2003-05-22 10:39:48
Message-ID: 1053599987.25709.2142.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(dot)Elphick(at)lfix(dot)co(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2003-05-22 11:15:33 Re: Pruning useless tables for queries
Previous Message Steve King 2003-05-22 09:35:14 Is postgres 7.2.1 safe if there is a power fail.