"Gowey, Geoffrey" <ggowey(at)rxhope(dot)com> writes:
> ... I have also tried the contrib
> tree, but all the programs in there use version 0 coding and I wish to start
> off on the right foot with pgsql by using the latest method.
The contrib tree is not as well maintained as the main source code.
Forget contrib, look in src/backend/utils/adt/ for a function that does
something similar to what you need to do.
regards, tom lane