Re: why provide cross type arithmetic operators

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: why provide cross type arithmetic operators
Дата
Msg-id 87y7aijc9l.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на why provide cross type arithmetic operators  ("ykhuang" <hyk@ruc.edu.cn>)
Ответы Re: why provide cross type arithmetic operators  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
"ykhuang" <hyk@ruc.edu.cn> writes:

> there are many cross type arithmetic operators, like int2 + int4, int8 +
> int4, I think these can be deleted. Here are the reasons, after deleted,
> int2 + int4 will choose the operator int4 + int4, int8 + int4 choose int8 +
> int8, Is that ok? Thanks.

Then the system wouldn't be able to use indexes as flexibly. For example if
you have an index on an int2 column and perform a query with a restriction
like "int2col = 1" the system wouldn't find a matching =(int2,int4) operator
and would instead have to do a sequential scan casting the int2 column to an
int4 when checking each row.


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

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

Предыдущее
От: Michael Akinde
Дата:
Сообщение: Re: BUG #3881: lo_open leaks memory
Следующее
От: Michael Akinde
Дата:
Сообщение: Re: BUG #3881: lo_open leaks memory