Re: Proposal - Support for National Characters functionality

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal - Support for National Characters functionality
Дата
Msg-id 7822.1375299779@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal - Support for National Characters functionality  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Proposal - Support for National Characters functionality  ("Arulappan, Arul Shaji" <arul@fast.au.fujitsu.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Also, as far as I understand what we want to control here is the
> encoding that the strings are in (the mapping of bytes to characters),
> not the collation (the way a set of strings are ordered).  So it doesn't
> make sense to set the NATIONAL CHARACTER option using the COLLATE
> keyword.

My thought is that we should simply ignore the NATIONAL CHARACTER syntax,
which is not the first nor the last brain-damaged feature design in the
SQL standard.  It's basically useless for what we want because there's
noplace to specify which encoding you mean.  Instead, let's consider that
COLLATE can define not only the collation but also the encoding of a
string datum.  Contrary to what I think you meant above, that seems
perfectly sensible to me, because after all a collation is necessarily a
bunch of rules about how to order a particular set of characters.  If the
data representation you use is unable to represent that set of characters,
it's not a very meaningful combination is it?

There's still the problem of how do you get a string of a nondefault
encoding into the database in the first place.  If you have to convert
to DB encoding to get it in there, then what's the use of a further
conversion?  This consideration may well kill the whole concept.
(It certainly kills NATIONAL CHARACTER syntax just as much.)
        regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Следующее
От: Antonin Houska
Дата:
Сообщение: Re: Backup throttling