Re: bug? in current cvs with bigint datatype

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug? in current cvs with bigint datatype
Date: 2002-05-11 16:05:06
Message-ID: 13096.1021133106@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Barry Lind <barry(at)xythos(dot)com> writes:
> create table test (cola bigint);
> update test set cola = 10000000000;
> ERROR: column "cola" is of type 'bigint' but expression is of type
> 'double precision'
> You will need to rewrite or cast the expression

dtoi8 is currently marked "not proimplicit". People seem to have lost
interest in the discussion thread about which coercions should be allowed
implicitly, but the issues still need to be resolved before 7.3.

This particular example perhaps says that when assigning to a table
column, we should allow not-proimplicit coercions to be invoked
implicitly anyway. Since there isn't any question about either the
source type or the target type, allowing this case doesn't seem to pose
any risk of surprising choices being made.

Comments anyone?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nigel J. Andrews 2002-05-11 18:27:30 Re: internal voting
Previous Message Ian Barwick 2002-05-11 16:01:46 Re: Set Returning Functions (SRF) - request for patch review and comment