I was just testing my product running on a 7.3 snapshot from a few days 
ago.  And I ran into the following change in behavior that I consider a 
bug.  You can no long insert large values into a bigint column without a 
cast.  Small values (in the int range work fine though).

On 7.3 I get:

files=# create table test (cola bigint);
CREATE
files=# insert into test values (9999999999);
ERROR:  column "cola" is of type 'bigint' but expression is of type 
'double precision'
    You will need to rewrite or cast the expression

On 7.2.1 this works correctly:

files=# create table test (cola bigint);
CREATE
files=# insert into test values (9999999999);
INSERT 108683 1

thanks,
--Barry



Thu, 15 Aug 2002 18:03:03 -0700
Barry Lind <barry@xythos.com>
Bug/Change in behavior for 7.3 vs 7.2.1
Dang it...meant to mention that the other day when I was working on
those python patches.  I had to place tick marks (single quote) around
the number and it was converted correctly.

gcope=# insert into a values ( 9999999999 ) ;
ERROR:  column "a" is of type 'bigint' but expression is of type 'double
precision'
	You will need to rewrite or cast the expression
gcope=# insert into a values ( '9999999999' ) ;
INSERT 25115 1

Greg


On Thu, 2002-08-15 at 20:03, Barry Lind wrote:
> I was just testing my product running on a 7.3 snapshot from a few days 
> ago.  And I ran into the following change in behavior that I consider a 
> bug.  You can no long insert large values into a bigint column without a 
> cast.  Small values (in the int range work fine though).
> 
> On 7.3 I get:
> 
> files=# create table test (cola bigint);
> CREATE
> files=# insert into test values (9999999999);
> ERROR:  column "cola" is of type 'bigint' but expression is of type 
> 'double precision'
>     You will need to rewrite or cast the expression
> 
> On 7.2.1 this works correctly:
> 
> files=# create table test (cola bigint);
> CREATE
> files=# insert into test values (9999999999);
> INSERT 108683 1
> 
> thanks,
> --Barry
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
15 Aug 2002 21:42:07 -0500
Greg Copeland <greg@CopelandConsulting.Net>
Re: Bug/Change in behavior for 7.3 vs 7.2.1
Barry Lind <barry@xythos.com> writes:
> You can no long insert large values into a bigint column without a 
> cast.

This seems to be fallout from the move to tighten up implicit coercions
(cf http://archives.postgresql.org/pgsql-hackers/2002-04/msg00528.php
as well as lots of earlier discussions).

I said right along that this topic needed more debate, but we haven't
gotten back to looking at it.  We have a number of other nasty behaviors
in current sources that trace back to altering the set of available
coercions.

			regards, tom lane

Fri, 16 Aug 2002 01:42:02 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug/Change in behavior for 7.3 vs 7.2.1 
Then shouldn't this appear on the "Open 7.3 issues" list that has been 
circulating around?  This seems like an open issue to me, that needs to 
be addressed before 7.3 ships.

--Barry

Tom Lane wrote:

>Barry Lind <barry@xythos.com> writes:
>  
>
>>You can no long insert large values into a bigint column without a 
>>cast.
>>    
>>
>
>This seems to be fallout from the move to tighten up implicit coercions
>(cf http://archives.postgresql.org/pgsql-hackers/2002-04/msg00528.php
>as well as lots of earlier discussions).
>
>I said right along that this topic needed more debate, but we haven't
>gotten back to looking at it.  We have a number of other nasty behaviors
>in current sources that trace back to altering the set of available
>coercions.
>
>			regards, tom lane
>
>  
>



Fri, 16 Aug 2002 09:17:47 -0700
Barry Lind <barry@xythos.com>
Re: Bug/Change in behavior for 7.3 vs 7.2.1
Barry Lind <barry@xythos.com> writes:
> Then shouldn't this appear on the "Open 7.3 issues" list that has been 
> circulating around?

It does.

			regards, tom lane

Fri, 16 Aug 2002 12:55:52 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug/Change in behavior for 7.3 vs 7.2.1 

It is already there, I think:

	fix implicit type coercions that are worse

---------------------------------------------------------------------------

Barry Lind wrote:
> Then shouldn't this appear on the "Open 7.3 issues" list that has been 
> circulating around?  This seems like an open issue to me, that needs to 
> be addressed before 7.3 ships.
> 
> --Barry
> 
> Tom Lane wrote:
> 
> >Barry Lind <barry@xythos.com> writes:
> >  
> >
> >>You can no long insert large values into a bigint column without a 
> >>cast.
> >>    
> >>
> >
> >This seems to be fallout from the move to tighten up implicit coercions
> >(cf http://archives.postgresql.org/pgsql-hackers/2002-04/msg00528.php
> >as well as lots of earlier discussions).
> >
> >I said right along that this topic needed more debate, but we haven't
> >gotten back to looking at it.  We have a number of other nasty behaviors
> >in current sources that trace back to altering the set of available
> >coercions.
> >
> >			regards, tom lane
> >
> >  
> >
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 16 Aug 2002 13:05:37 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Bug/Change in behavior for 7.3 vs 7.2.1