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: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Cleaning up the INET/CIDR mess |
Date: | 2006-01-26 22:04:50 |
Message-ID: | 200601262204.k0QM4o523968@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Tom Lane wrote:
> >> Without the flag, it's okay for cidr-to-inet to be a
> >> binary-compatible (no function) conversion. However, inet-to-cidr
> >> has to either zero out bits to the right of the netmask, or error out
> >> if any are set. Joachim Wieland posted a patch that makes the
> >> coercion function just silently zero out any such bits. That's OK
> >> with me, but does anyone want to argue for an error?
>
> > Zero the bits if it's an explicit cast, raise an error if not.
>
> I know there's precedent for such behavior in the SQL spec, but it
> always seemed pretty ugly to me :-(. The patch-as-committed just
> silently zeroes the bits during any inet->cidr cast. I'll change it
> if there's consensus that that's a bad idea, but I don't really see
> a reason to.
I agree. Let's do the zeroing and see if people complain about it.
Throwing an error seems extreme.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-01-26 22:09:34 | Re: [HACKERS] [GENERAL] [PATCH] Better way to check for getaddrinfo |
Previous Message | Tom Lane | 2006-01-26 21:41:32 | Re: VACUUM Question |