Skip site navigation (1) Skip section navigation (2)

Re: why provide cross type arithmetic operators

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "ykhuang" <hyk(at)ruc(dot)edu(dot)cn>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: why provide cross type arithmetic operators
Date: 2008-01-22 12:05:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"ykhuang" <hyk(at)ruc(dot)edu(dot)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
  Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to


pgsql-bugs by date

Next:From: Tomasz OstrowskiDate: 2008-01-22 14:19:15
Subject: Re: BUG #3881: lo_open leaks memory
Previous:From: Michael AkindeDate: 2008-01-22 11:27:55
Subject: Re: BUG #3881: lo_open leaks memory

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group