Re: IPv6 Support for INET/CIDR types. - Mailing list pgsql-patches

From Paul Vixie
Subject Re: IPv6 Support for INET/CIDR types.
Date
Msg-id 20020311185059.B06E228F11@as.vix.com
Whole thread Raw
In response to Re: IPv6 Support for INET/CIDR types.  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
> I would like to see some activity on this item soon.  Historically, the
> CIDR stuff has arrived during beta when we can't apply any major changes.

to reiterate... i am able to fix up the postgres "inet" and "cidr" types
to make them ipv6-capable, if someone who knows the current system can do
two things:

1. import the current bind versions of inet_{net,}_{pton,ntop}.c and
move the pgsql-specific logic out of the current modified versions of
those files and up into some other part of postgres.  this will keep
the current type behaviour but remove the "modified bind" versions of
some critical library functions.

2. change the build system to only use the "postgres" versions of these
functions if the system libraries (libc and libbind, mostly) don't have
them.  this will ensure that bugfixes and enhancements to the BIND
versions of these files are not obscured by postgres's own versions.

if those two things were done (presumably #1 by the person who integrated
my original CIDR type and #2 by someone who knows the postgres build
system) then i would immediately do #3:

3. change the INET and CIDR type support to include IPv6.

re:

> ---------------------------------------------------------------------------
>
> Vadim Kogan wrote:
>
> Checking application/pgp-signature: FAILURE
> -- Start of PGP signed section.
> > On Fri, Feb 22, 2002 at 02:59:34PM -0500, Bruce Momjian wrote:
> > > Paul Vixie wrote:
> > > > > I don't believe the original patch ever made it into anything.
> > > >
> > > > vadim's original patch was the basis for BIND's ipv6 support in the
> > > > set of functions that pgsql borrows from BIND.  so, it did make it
> > > > into _something_ just not the modified pgsql mirrors of these functions.
> > > >
> > > > my proposal is that we do away with the modified pgsql mirrors of these
> > > > functions and teach the INET and CIDR handlers to "wrap" the BIND functions
> > > > in a way that modifies the presentation format to be postgres-compatible.
> > > > that way postgres can import new versions of, or use LIBC versions of,
> > > > the BIND functions without having to worry about local modifications to them.
> > >
> > > Are we sure the Bind library versions are going to be on all the OS's we
> > > support?
> >
> > Eventually they will. I think that for now it's reasonable to
> >
> > a) make sure that the files in postgres are _exact_ copies of those in BIND.
> >
> > b) check to see whether the host provides the functionality, and if it does,
> > use whatever host gives us, instead of local version
> >
> > c) At some point remove the local version alltogether.
> >
> > Vadim.
> >
> -- End of PGP section, PGP failed!
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


pgsql-patches by date:

Previous
From: "Zhenbang Wei"
Date:
Subject: Update psql-zh_TW.po
Next
From: Alexey Slynko
Date:
Subject: JDBC arrays