Re: [HACKERS] CIDR/INET improvements

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] CIDR/INET improvements
Date: 2006-01-24 09:27:58
Message-ID: 20060124092758.GA24797@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, Jan 23, 2006 at 11:30:58PM -0500, Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Patch for testing attached.

> This is an utterly bad idea, because it not only doesn't address the
> problem (ie, confusion about whether inet and cidr are distinct types
> or not), but it masks mistakes in that realm by hiding data on output.
> It'll be almost impossible to debug situations where x is different
> from y but they display the same.

FWIW, I append the patch I've done a few weeks ago. It adds an inettocidr
cast function.
I updated it to comply to Bruce's recent "ip_type" -> "ip_is_cidr" change.

Joachim

--
Joachim Wieland joe(at)mcknight(dot)de
C/ Usandizaga 12 1°B ICQ: 37225940
20002 Donostia / San Sebastian (Spain) GPG key available

Attachment Content-Type Size
pg_inettocidr.3.diff text/plain 8.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message R, Rajesh (STSD) 2006-01-24 09:40:18 Re: [HACKERS] [PATCH] Better way to check for getaddrinfo function.
Previous Message Andrew J. Kopciuch 2006-01-24 09:26:14 Re: Cache lookup failed error in tsearch2?

Browse pgsql-patches by date

  From Date Subject
Next Message R, Rajesh (STSD) 2006-01-24 09:40:18 Re: [HACKERS] [PATCH] Better way to check for getaddrinfo function.
Previous Message Achilleus Mantzios 2006-01-24 09:06:52 DBMirror.pl performance change