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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

Responses

pgsql-hackers by date

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

pgsql-patches by date

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

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