"Tim Vadnais" <tvadnais@earthlink.net> writes:
> My questions are: Is there a way I can dynamically determine the number of
> fields in the row that is being maintained. (a function much like:
> PQnfields(const PGresult *); )
> Then I need a way to get the name of the field (using a function much like:
> PQfname(const PGresult *, int); )
plpgsql isn't capable of doing dynamic field access. You could do this
in pltcl, I think, and definitely in C. There are some related examples
in contrib/spi/.
regards, tom lane