pl/pgsql doesn't seem to be very well documented. It would be cool if
it were better documented, or if there were a tutorial. It would be
even cooler if there were a pl/pgsql library, and also a library of C
language functions that people could use.
However, in the meantime, people on this list can answer the
questions. If you email me directly, I can probably answer many or
most pl/pgsql questions.