BUG #5630: CREATE INDEX does not use schema search path - Mailing list pgsql-bugs

From tbz
Subject BUG #5630: CREATE INDEX does not use schema search path
Date
Msg-id 201008271456.o7REumna028567@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5630: CREATE INDEX does not use schema search path  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5630
Logged by:          tbz
Email address:      tbb@vollbio.de
PostgreSQL version: 8.3.11
Operating system:   Debian Sqeeze
Description:        CREATE INDEX does not use schema search path
Details:

1. Create a new schema like a login user
2. Write a script, that creates a new table pg_user (system table!) and
seperately an index on it
3. Run the script

The table is created in the "user" schema. The creating of the index results
in

 [Error Code: 0, SQL State: 42501]  FEHLER: Berechtigung nur für
Eigentümer der Relation pg_user

I have to use the full qualified table name while creating the index.
pg_user seems to be a system table, but I think this error will also be
occured, when there is an table with an identical name in schema public.

Bye Thomas

---------- Snip ----------

CREATE TABLE pg_user (
 login_name VARCHAR(50) NOT NULL
);
CREATE UNIQUE INDEX ak1_login_name ON pg_user(login_name);

---------- Snap ----------

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Next
From: Tom Lane
Date:
Subject: Re: BUG #5630: CREATE INDEX does not use schema search path