Re: Summary: what to do about INET/CIDR - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Summary: what to do about INET/CIDR
Date
Msg-id 6631.973787436@sss.pgh.pa.us
Whole thread Raw
In response to Re: Summary: what to do about INET/CIDR  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Summary: what to do about INET/CIDR
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
>> Well, we need *some* way to extract a representation like "w.x.y.z/n".
>> If you don't like text() as the name of that formatting function,
>> suggest another name...

> all_octets(cidr)::text maybe?

No, because that doesn't accurately describe what it does for inet
items --- those'd be shown with all octets anyway.  For inet, the
critical thing this function will do is force the netmask to be shown
even if it's /32.

Given that we are using host() for the function that shows just the
IP address part of an inet/cidr value, how about hostandmask() for
the function that always shows everything?

I still prefer text() though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: AW: Unhappy thoughts about pg_dump and objects inherited from template1
Next
From: Peter Eisentraut
Date:
Subject: Schemas (Re: AW: Unhappy thoughts about pg_dump and objects inherited from template1)