Re: BUG #5630: CREATE INDEX does not use schema search path

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5630: CREATE INDEX does not use schema search path
Дата
Msg-id 3253.1282933548@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5630: CREATE INDEX does not use schema search path  ("tbz" <tbb@vollbio.de>)
Список pgsql-bugs
"tbz" <tbb@vollbio.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "tbz"
Дата:
Сообщение: BUG #5630: CREATE INDEX does not use schema search path
Следующее
От: "David Kensiski"
Дата:
Сообщение: BUG #5631: psql dumps core during command editing