Re: [HACKERS] SELECT BUG

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] SELECT BUG
Дата
Msg-id 12054.936338368@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] SELECT BUG  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> This inconsistency bothers me: I've always thought that char(),
>> varchar(), and text() are functionally interchangeable, but it seems
>> that's not so.  Is this behavior mandated by SQL92?

> I haven't found any explicit reference to a distinction between CHAR
> and VARCHAR in the docs nor a discussion of the SQL_TEXT character set
> wrt this topic. So apparently SQL_TEXT properties are implementation
> defined too. But we should look into it more before deciding to change
> anything because afaik the current behavior has been the same in
> Postgres forever...

I'm not necessarily arguing for a change; if you're satisfied that
the existing comparison logic obeys the spec, it's OK with me.
(Ignoring trailing blanks in bpchar does seem reasonable when you
think about it.)

But if it is correct, then we need to turn off oprcanhash for bpchareq.
Odd that no one has noticed this before.

Some doc updates might be in order too...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] md.c is feeling much better now, thank you
Следующее
От: Andreas Zeugswetter
Дата:
Сообщение: Re: [HACKERS] SELECT BUG