Re: Relation 'pg_user' does not exist

From: Matt Beauregard <matt(at)designscape(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Relation 'pg_user' does not exist
Date: 2000-11-09 00:42:00
Message-ID: 20001109114200.T324@designscape.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 08, 2000 at 07:13:30PM -0500, Tom Lane wrote:
> The plot thickens ... what did you say the error message was
exactly?

!759 marauder(at)bofh:~$ pg_dump -h tweedledee ds
getTypes(): SELECT failed. Explanation from backend: 'ERROR:
Relation 'pg_user' does not exist

When trying to recreate pg_user using your command:
template1=> CREATE VIEW pg_user AS
template1-> SELECT
template1-> usename,
template1-> usesysid,
template1-> usecreatedb,
template1-> usetrace,
template1-> usesuper,
template1-> usecatupd,
template1-> '********'::text as passwd,
template1-> valuntil
template1-> FROM pg_shadow
template1-> ;
ERROR: Relation 'pg_user' already exists
(which is oddly different from the error I got the first time)

When trying to do something with pg_user in template1:
template1=> select * from pg_user;
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
ERROR: cannot open relation pg_user
template1=> \d pg_user
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: RelationIdBuildRelation: smgropen(pg_views): No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
ERROR: cannot open relation pg_views
template1=> \dt pg_user
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_user: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
NOTICE: mdopen: couldn't open pg_views: No such file or directory
ERROR: cannot open relation pg_views

> Actually, what'd be really useful here is to see where the error is
> being reported. Try this:

Tried it, couldn't get the breakpoint to trigger the first time,
restarted postgres, got a different set of messages again.

template1=> select * from pg_user;
ERROR: Relation 'pg_user' does not exist

(bt:)
#0 0x812db0c in elog ()
#1 0x806dbae in heap_openr ()
#2 0x80c0088 in addRangeTableEntry ()
#3 0x80bac8d in transformTableEntry ()
#4 0x80bacc7 in transformTableEntry ()
#5 0x80ba824 in makeRangeTable ()
#6 0x80b18d7 in parse_analyze ()
#7 0x80b0260 in parse_analyze ()
#8 0x80aff2a in parse_analyze ()
#9 0x80ba3dd in parser ()
#10 0x80f4ddb in pg_parse_and_rewrite ()
#11 0x80f50a3 in pg_exec_query_dest ()
#12 0x80f5069 in pg_plan_query ()
#13 0x80f6172 in PostgresMain ()
#14 0x80dea6c in PostmasterMain ()
#15 0x80de5a8 in PostmasterMain ()
#16 0x80dd789 in PostmasterMain ()
#17 0x80dd186 in PostmasterMain ()
#18 0x80afe8f in main ()
#19 0x80639f9 in _start ()

(then:)
template1=> CREATE VIEW pg_user AS
template1-> SELECT
template1-> usename,
template1-> usesysid,
template1-> usecreatedb,
template1-> usetrace,
template1-> usesuper,
template1-> usecatupd,
template1-> '********'::text as passwd,
template1-> valuntil
template1-> FROM pg_shadow
template1-> ;
ERROR: Illegal class name 'pg_user'
The 'pg_' name prefix is reserved for system catalogs

Dammit, the error messages won't even stay constant...

--
Matt Beauregard
Information Technology Operations, DesignScape

Ph: +61 2 9361 4233 Fx: +61 2 9361 4633

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Pilsl 2000-11-09 01:00:58 Re: TEXT and BLOBS
Previous Message Eric Bianchi 2000-11-09 00:35:05 OID problems