Re: contrib/xinetops for 8.1 "patch"

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>, pgsql-patches(at)postgresql(dot)org
Subject: Re: contrib/xinetops for 8.1 "patch"
Date: 2006-02-10 04:12:23
Message-ID: 200602100412.k1A4CNZ06713@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > A larger problem is this:
>
> > test=> SELECT '255.255.255.0'::inet - '1.1.1.1'::inet;
> > ?column?
> > -----------
> > -16843265
> > (1 row)
>
> > Should subtraction return int8?
>
> Probably, and for that matter the addition operators should take int8;
> on IPV6 data even that's not really wide enough.
>
> > We don't have an unsigned data type. Of course we also have this
> > excitement:
>
> > test=> SELECT '255.255.255.0'::inet + 1000000;
> > ?column?
> > ------------
> > 0.15.65.64
> > (1 row)
>
> > so we underflow and overflow cleanly. Not great, but it works.
>
> "Cleanly" isn't the adjective I'd use for that. There should be an
> overflow error.

OK, changed to int8, and overflow checks added.

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

Attachment Content-Type Size
unknown_filename text/plain 15.0 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Kris Jurka 2006-02-10 05:44:29 Re: pgsql: Allow psql multi-line column values to align
Previous Message Bruce Momjian 2006-02-10 00:39:04 pgsql: Allow psql multi-line column values to align in the proper