"M. Bastin" <marcbastin@mindspring.com> writes:
> 1. How do I find the user name for a given pid?
See pg_stat_activity.
> 2. Where's the list that links all valid text encoding names with the
> numbers representing them? (E.g. UNICODE = 6)
I don't believe this list exists as a system catalog. It is accessible
through the pg_char_to_encoding() and pg_encoding_to_char() functions,
though.
> Is there an easy way to recoup how the different system tables are
> related to each other, or does one simply have to know?
See the docs:
http://www.postgresql.org/docs/7.4/static/catalogs.html
regards, tom lane