Richard Welty <rwelty(at)averillpark(dot)net> writes:
> the tougher part is that for each row, i
> need to send an email to a contact address.
Why reinvent the wheel?
http://pgmail.sourceforge.net/
http://stream.boxwatch.ru/~petere/plsh.html
If you really want a C-based version, I seem to recall that Gene Selkov
made one, but I can't find a URL at the moment.
regards, tom lane