Re: [HACKERS] Linux.conf.au 2003 Report
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Crawford <scrawford@pinpointresearch.com>
Cc: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>, "Hackers" <pgsql-hackers@postgresql.org>, "Advocacy" <pgsql-advocacy@postgresql.org>
Date: 2003-01-30T16:28:41Z
Lists: 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