From: | Haris Peco <snpe(at)snpe(dot)co(dot)yu> |
---|---|
To: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Strange syntax for create/drop index |
Date: | 2006-04-09 04:33:35 |
Message-ID: | 200604090433.38221.snpe@snpe.co.yu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael,
Thank you for answer, but you don't understand me
I understood syntax and reason for this, but why postgreSQL doesn't accept this :
create index test.test_name on test.test(name)
schema prefix in 'create index'
I know that it isn't necessary, because postgreSQL know that index is (must be)
in table's schema, but this is natural for sql writers
I expect that 'create ...' and 'drop ...' allow/request/don't accept schema prefix on same way
Thanks
Peco
On Sunday 09 April 2006 02:08 am, Michael Glaesemann wrote:
>
> On Apr 9, 2006, at 12:56 , Haris Peco wrote:
>
> > 'drop index' request schema prefix, but 'create index' doesn't
> > accept schema prefix
>
> Currently indexes must be in the same schema as the table they index,
> so no schema is accepted for CREATE INDEX. Indeed, the documentation
> for CREATE INDEX describes the name parameter so:
>
> http://www.postgresql.org/docs/current/interactive/sql-
> createindex.html#AEN42146
>
> > name
> >
> > The name of the index to be created. No schema name can be
> > included here; the index is always created in the same schema as
> > its parent table.
>
> However, you could have two or more indexes with the same name, but
> in different schemas, so you need to be able to schema-qualify an
> index when you drop it, so DROP INDEX accepts a schema-qualified name.
>
> Hope this helps.
>
> Michael Glaesemann
> grzm myrealbox com
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2006-04-09 04:48:55 | Re: Strange syntax for create/drop index |
Previous Message | Tony Caduto | 2006-04-09 04:14:41 | Re: More PostgreSQL conversion fun |