Обсуждение: Can't CREATE INDEX on a schema?

Поиск
Список
Период
Сортировка

Can't CREATE INDEX on a schema?

От
"Marc G. Fournier"
Дата:
or am I doing it wrong?

ams=# create index company_00001.traffic_ip on company_00001.traffic using btree ( ip_id ) ;
ERROR:  parser: parse error at or near "." at character 27



Re: Can't CREATE INDEX on a schema?

От
Frank Wiles
Дата:
On Wed, 15 Oct 2003 14:54:43 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org> wrote:

> 
> or am I doing it wrong?
> 
> ams=# create index company_00001.traffic_ip on company_00001.traffic
> using btree ( ip_id ) ; ERROR:  parser: parse error at or near "." at
> character 27
> 
> 
> ---------------------------(end of
> broadcast)--------------------------- TIP 9: the planner will ignore
> your desire to choose an index scan if your
>       joining column's datatypes do not match
> 
  It works if you leave the period out of the index name.  Not sure  why it errors, but if you replace the period with
anunderscore  it'll create. 
 
---------------------------------  Frank Wiles <frank@wiles.org>
http://frank.wiles.org---------------------------------



Re: Can't CREATE INDEX on a schema?

От
Neil Conway
Дата:
On Wed, 2003-10-15 at 13:54, Marc G. Fournier wrote:
> ams=# create index company_00001.traffic_ip on company_00001.traffic using btree ( ip_id ) ;
> ERROR:  parser: parse error at or near "." at character 27

RTM:
name
       The name of the index to be created. No schema name can be       included here; the index is always created in
thesame schema as       its parent table.       
 
From
http://candle.pha.pa.us/main/writings/pgsql/sgml/sql-createindex.html

-Neil




Re: Can't CREATE INDEX on a schema?

От
Andrew Dunstan
Дата:
Marc G. Fournier wrote:

>or am I doing it wrong?
>
>ams=# create index company_00001.traffic_ip on company_00001.traffic using btree ( ip_id ) ;
>ERROR:  parser: parse error at or near "." at character 27
>
>  
>
/Docs on "create index" state:

index_name

/     The name of the index to be created. No schema name can be   included here; the index is always created in the
sameschema as its   parent table.
 
   cheers
   andrew