From: | "ykhuang" <hyk(at)ruc(dot)edu(dot)cn> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: why provide cross type arithmetic operators |
Date: | 2008-01-22 05:55:34 |
Message-ID: | fn40l4$2vl4$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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 int2 + int8, so two operators
available, they are int4 + int8 and int8 + int8,
system can't choose a best candidate operator.
"ykhuang" <hyk(at)ruc(dot)edu(dot)cn> :fn3n3o$1g5r$1(at)news(dot)hub(dot)org(dot)(dot)(dot)
> 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.
>
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2008-01-22 08:59:28 | bad message or bad privilege check in foreign key constraint |
Previous Message | ykhuang | 2008-01-22 03:14:25 | why provide cross type arithmetic operators |