From: | Jorge Godoy <jgodoy(at)gmail(dot)com> |
---|---|
To: | PostgreSQL General ML <pgsql-general(at)postgresql(dot)org> |
Subject: | Why isn't it allowed to create an index in a schema other than public? |
Date: | 2006-11-12 12:06:46 |
Message-ID: | 877iy0g97t.fsf@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | tam wei | 2006-11-12 12:09:40 | Enable monitoring on the health of postgres db |
Previous Message | Jorge Godoy | 2006-11-12 11:15:06 | Re: DB Designer?? |