CIDR output format

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul A Vixie <vixie(at)mfnx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: CIDR output format
Date: 2000-12-20 18:06:33
Message-ID: 5809.977335593@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paul A Vixie <vixie(at)mfnx(dot)net> writes:
> cisco IOS just won't take 10/8 and insists on 10.0.0.0/8. you will never,
> ever go wrong if you try to use 10.0.0.0/8, since everything that understands
> CIDR understands that. 10/8 is a pleasant-appearing alternative format, but
> it is not universally accepted and i recommend against it. (i'm not sure if
> my original CIDR type implementation for pgsql output the shorthand or not;
> if it did, then i apologize to one and all.)

Well, that's an earful. Faced with this authoritative opinion, I
withdraw my previous objections to changing the output format for CIDR.

It would seem that the appropriate behavior would be to make the default
display format for CIDR be like "10.0.0.0/8". Now the text() conversion
function already produces this same format. I'd be inclined to leave
text() as-is and add a new conversion function with some other name
(suggestions anyone?) that produces the shorthand form "10/8" as text,
for those who prefer it.

Comments?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-12-20 18:07:54 Replication toolkit added to repository
Previous Message Bruce Momjian 2000-12-20 18:02:10 Re: Re: Generating HISTORY file