Skip site navigation (1) Skip section navigation (2)

Re: [RFC] Unsigned integer support.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Ryan Bradetich <rbradetich(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] Unsigned integer support.
Date: 2008-07-25 16:44:08
Message-ID: 20080725164408.GN9891@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Gregory Stark escribió:
> "Alvaro Herrera" <alvherre(at)commandprompt(dot)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.

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-07-25 17:09:15
Subject: Re: Transaction-controlled robustness for replication
Previous:From: Jaime CasanovaDate: 2008-07-25 16:30:21
Subject: Re: Column level privileges was:(Re: Extending grant insert on tables to sequences)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group