Matt Beauregard <matt@designscape.com.au> writes:
>> Ugh, something's more hosed than I thought, then. What do you get
>> from "select * from pg_class" in template1?
> 65 rows of stuff, including
> pg_user | 0 | 70 | 0 |
> 0 | 0 | 0 | f | f | r |
> 8 | 0 | 0 | 0 | 0 | 0 | f
> | t |
> pg_rules | 0 | 70 | 0 |
> 0 | 0 | 0 | f | f | r |
> 3 | 0 | 0 | 0 | 0 | 0 | f
> | t |
> pg_views | 0 | 70 | 0 |
> 0 | 0 | 0 | f | f | r |
> 3 | 0 | 0 | 0 | 0 | 0 | f
> | t |
The plot thickens ... what did you say the error message was exactly?
Actually, what'd be really useful here is to see where the error is
being reported. Try this:
Window 1: start psql in template1
Window 2: find out PID of backend connected to psql; then, as postgres
user, run "gdb /path/to/postgres/executable" and do this:
attach PID-of-backend
break elog
cont
Window 1: issue failing query (whatever will provoke the error about
pg_user not existing)
Window 2: should get a breakpoint response. Say
bt
quit
y
and send the output from the bt command ...
regards, tom lane