Re: Linux.conf.au 2003 Report - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Linux.conf.au 2003 Report
Date
Msg-id 19952.1043944121@sss.pgh.pa.us
Whole thread Raw
In response to Re: Linux.conf.au 2003 Report  (Steve Crawford <scrawford@pinpointresearch.com>)
Responses Re: Linux.conf.au 2003 Report  (Kurt Roeckx <Q@ping.be>)
Re: Linux.conf.au 2003 Report  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
Steve Crawford <scrawford@pinpointresearch.com> writes:
> What about cases where I only want one or the other? Would a simple method
> exist to limit input to v4 or v6 only?

I would assume we'd add a test function like is_v6(inet).  Given that,
you could add a check constraint "is_v6(col)" or "NOT is_v6(col)" to
any column that you want to restrict.

> Also, what are the implications to functions such as network_sub,
> network_cmp, etc. when given mixed v4/v6 inputs as could easily happen if the
> two are freely mixed in the same data type?

We have to work out what the semantics should be.  I don't know anything
about v6, but I'd imagine v4 addresses form a defined subset of the v6
address space ... if so the semantics seem pretty straightforward.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Linux.conf.au 2003 Report
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL, NetBSD and NFS