> - how do I see details of the various constraints (e.g foreign keys) in
> psql client? Am I looking at a system-table query?
Most of this can be seen with
\d tableName
(also see \? for more psql backslash commands)
though I don't think foreign keys are shown.
I am not exactly sure how to get that information,
but you might try searching the mailing list
archives.
> - Er, what can I use as a comment character in a sql file? Multiple
> hashmarks seem to cause parse errors
-- this is a comment
(I believe this is an SQL standard)