Re: [RFC] Unsigned integer support.

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [RFC] Unsigned integer support.
Дата
Msg-id 20080725154253.GM9891@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [RFC] Unsigned integer support.  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: [RFC] Unsigned integer support.  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark escribió:

> One other idea that's been mentioned before is treating integral constants
> like 150000 as type "unknown" like the quoted '150000' constant is. That way
> the parser would see uint4+unknown and could pick the uint4 operator. But that
> would be a pretty massive semantics change.

Hmm, if we do that, how would the system resolve something like this?

select 1000 + 1000

There would be no clue as to what + operator to pick, since both
operands are unknown.  This is in fact what happens today with

alvherre=# select '100' + '100';
ERROR:  operator is not unique: unknown + unknown at character 14
HINT:  Could not choose a best candidate operator. You might need to add explicit type casts.
STATEMENT:  select '100' + '100';

I think this is a nonstarter.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: "Ryan Bradetich"
Дата:
Сообщение: Re: [RFC] Unsigned integer support.
Следующее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: Do we really want to migrate plproxy and citext intoPG core distribution?