Re: lexing small ints as int2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: lexing small ints as int2
Дата
Msg-id 2023.1283556966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на lexing small ints as int2  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: lexing small ints as int2  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I'm researching if smallint can be made a higher-class citizen of our type
> system than currently.

> Does anyone know where to find the discussion refered to here?
> http://archives.postgresql.org/pgsql-hackers/2008-10/msg01485.php

I think this was the last time I tried it:
http://archives.postgresql.org/pgsql-hackers/2002-11/msg00468.php

At the time, the main motivation for worrying about it was that cases
like "WHERE smallintcol = 42" couldn't be indexed, because 42 is int4
not int2.  We've since fixed that by allowing cross-type operators
to be indexable.

I also notice that one of the failure cases I cited might no longer be
an issue now that we don't have implicit casts to text, but that change
isn't going to do anything for the other cases.

On the whole I'm still afraid that changing the initial typing of
integer constants is going to break a lot of code while buying not much.
Do you have a specific reason for reopening the issue?  Or is your
concern something different?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ps buffer is incorrectly padded on the (latest) OS X
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: regclass without error?