Re: [BUGS] why provide cross type arithmetic operators

2008-03-25 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Added to TODO: > > * Add more cross-data-type operators > > http://archives.postgresql.org/pgsql-bugs/2008-01/msg00189.php > > Uh ... that is exactly 180 degrees away from the point of the thread. OK, I see now, updated: *

Re: [BUGS] why provide cross type arithmetic operators

2008-03-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Added to TODO: > * Add more cross-data-type operators > http://archives.postgresql.org/pgsql-bugs/2008-01/msg00189.php Uh ... that is exactly 180 degrees away from the point of the thread. regards, tom lane -- Sent via pgsql-

Re: [BUGS] why provide cross type arithmetic operators

2008-03-24 Thread Bruce Momjian
Added to TODO: * Add more cross-data-type operators http://archives.postgresql.org/pgsql-bugs/2008-01/msg00189.php --- ykhuang wrote: > there are many cross type arithmetic operators, like int2 + int4, int8 + > int4, I

Re: [BUGS] why provide cross type arithmetic operators

2008-01-22 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > "ykhuang" <[EMAIL PROTECTED]> 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

Re: [BUGS] why provide cross type arithmetic operators

2008-01-22 Thread Gregory Stark
"ykhuang" <[EMAIL PROTECTED]> 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.

[BUGS] why provide cross type arithmetic operators

2008-01-22 Thread ykhuang
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. ---(end of broadcast)

Re: [BUGS] why provide cross type arithmetic operators

2008-01-22 Thread ykhuang
for example, postgres=# select int2'1' + int8'1'; ERROR: operator is not unique: smallint + bigint LINE 1: select int2'1' + int8'1'; ^ HINT: Could not choose a best candidate operator. You may need to add explicit type casts. there are int4 + int8 and int8 + int8, but no