Updated patch attached.
1. Now supports new constructor scheme. If you define a range foorange,
you get the following constructors:
* foorange() -- produces empty foorange
* foorange(S) -- produces singleton range [S]
* foorange(L,B) -- produces range [L,B)
* foorange(L,B,'(]') -- produces range (L,B]
Actually, the two-argument form uses a special "default_flags" that can
be specified at creation time, and that defaults to '[)'.
The way I accomplish this is by generating 4 functions at definition
time -- a little ugly, and I am open to suggestions. I ran into a
problem using the default argument as Robert suggested because
pg_node_tree doesn't have a working input function (intentionally so),
so I couldn't get the built-in range types to work with initdb. The
constructors all essentially point to the same C function, aside from
some indirection that I did to avoid excessive complaining from the
opr_sanity test. Again, suggestions welcome.
2. Documentation has been updated.
3. Now there's support for multiple range types over a single base type,
e.g. two text ranges using different collations.
There is still some cleanup to do, e.g. pg_dump. I'd like to get some
feedback to stabilize the user-facing behavior before I put too much
effort into the code cleanup (which shouldn't take long, but I just
don't want to work toward a moving target).
In response to
pgsql-hackers by date
|Next:||From: Hannu Krosing||Date: 2011-09-01 08:13:32|
|Subject: help with plug-in function for additional (partition/shard)
|Previous:||From: hubert depesz lubaczewski||Date: 2011-09-01 06:05:51|
|Subject: Re: [GENERAL] pg_upgrade problem|