Re: [RFC] Unsigned integer support. - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [RFC] Unsigned integer support.
Date
Msg-id 20080725164408.GN9891@alvh.no-ip.org
Whole thread Raw
In response to Re: [RFC] Unsigned integer support.  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: [RFC] Unsigned integer support.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: [RFC] Unsigned integer support.  (Decibel! <decibel@decibel.org>)
List pgsql-hackers
Gregory Stark escribió:
> "Alvaro Herrera" <alvherre@commandprompt.com> writes:
> 
> > Hmm, if we do that, how would the system resolve something like this?
> >
> > select 1000 + 1000
> 
> Well we have the same problem with 'foo' || 'bar'. The question I think is
> whether the solution there scales to having two different fallback types.

Hmm, right.  But you need more than two: consider

alvherre=# select 0.42 + 1;?column? 
----------    1.42
(1 ligne)

However, it would be neat if this behaved the same as

alvherre=# select '0.42' + 1;
ERROR:  invalid input syntax for integer: "0.42"
STATEMENT:  select '0.42' + 1;

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: Column level privileges was:(Re: Extending grant insert on tables to sequences)
Next
From: Simon Riggs
Date:
Subject: Re: Transaction-controlled robustness for replication