| 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: | 87y7aijc9l.fsf@oxford.xeocode.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| 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
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomasz Ostrowski | 2008-01-22 14:19:15 | Re: BUG #3881: lo_open leaks memory |
| Previous Message | Michael Akinde | 2008-01-22 11:27:55 | Re: BUG #3881: lo_open leaks memory |