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 15:42:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Gregory Stark escribió:

> One other idea that's been mentioned before is treating integral constants
> like 150000 as type "unknown" like the quoted '150000' constant is. That way
> the parser would see uint4+unknown and could pick the uint4 operator. But that
> would be a pretty massive semantics change.

Hmm, if we do that, how would the system resolve something like this?

select 1000 + 1000

There would be no clue as to what + operator to pick, since both
operands are unknown.  This is in fact what happens today with

alvherre=# select '100' + '100';
ERROR:  operator is not unique: unknown + unknown at character 14
HINT:  Could not choose a best candidate operator. You might need to add explicit type casts.
STATEMENT:  select '100' + '100';

I think this is a nonstarter.

Alvaro Herrera                      
The PostgreSQL Company - Command Prompt, Inc.

In response to


pgsql-hackers by date

Next:From: Hiroshi SaitoDate: 2008-07-25 16:25:55
Subject: Re: Do we really want to migrate plproxy and citext intoPG core distribution?
Previous:From: Ryan BradetichDate: 2008-07-25 15:25:48
Subject: Re: [RFC] Unsigned integer support.

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