Why isn't it allowed to create an index in a schema other than public?

Поиск
Список
Период
Сортировка
От Jorge Godoy
Тема Why isn't it allowed to create an index in a schema other than public?
Дата
Msg-id 877iy0g97t.fsf@gmail.com
обсуждение исходный текст
Ответы Re: Why isn't it allowed to create an index in a schema  (Chris Mair <chrisnospam@1006.org>)
Re: Why isn't it allowed to create an index in a schema other than public?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi!


I'd like to know if there's any reasoning for not allowing creating an index
inside the same schema where the table is.  For example, if I have a
multi-company database where each company has its own schema and its employees
table, shouldn't I have a different index for each of those?  What if I have
some slightly different columns on some of these tables?

================================================================================
teste=# create schema testing;
CREATE SCHEMA
teste=# create table testing.testing123 (something serial primary key, otherthing float);
NOTICE:  CREATE TABLE will create implicit sequence "testing123_something_seq" for serial column "testing123.something"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "testing123_pkey" for table "testing123"
CREATE TABLE
teste=# create index testing.testing123_index on testing.testing123 (otherthing);
ERROR:  syntax error at or near "." no caracter 21
LINHA 1: create index testing.testing123_index on testing.testing123 ...
                             ^
teste=#
================================================================================


(I wouldn't mind if the autogenerated index for the PK was created on the
public schema if no specific name was supplied.)


This would also help identifying all objects to make a certain feature
available and where they belong to on the database...


TIA,
--
Jorge Godoy      <jgodoy@gmail.com>

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

Предыдущее
От: Jorge Godoy
Дата:
Сообщение: Re: DB Designer??
Следующее
От: "tam wei"
Дата:
Сообщение: Enable monitoring on the health of postgres db