| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "tbz" <tbb(at)vollbio(dot)de> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #5630: CREATE INDEX does not use schema search path |
| Date: | 2010-08-27 18:25:48 |
| Message-ID: | 3253.1282933548@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
"tbz" <tbb(at)vollbio(dot)de> writes:
> CREATE TABLE pg_user (
> login_name VARCHAR(50) NOT NULL
> );
> CREATE UNIQUE INDEX ak1_login_name ON pg_user(login_name);
> [fails]
This is expected, given the default search_path settings in which
pg_catalog is implicitly at the front of the path. When you create
pg_user, it's created in whichever schema is the creation target schema
(ie, the first schema listed explicitly in search_path, perhaps
"public"). However, that's still behind pg_catalog, so the unqualified
reference to pg_user in the CREATE INDEX command resolves as
pg_catalog.pg_user. See
http://www.postgresql.org/docs/8.3/static/ddl-schemas.html#DDL-SCHEMAS-CATALOG
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Kensiski | 2010-08-27 18:55:56 | BUG #5631: psql dumps core during command editing |
| Previous Message | Tom Lane | 2010-08-27 15:11:29 | Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART |