Thread: Can't CREATE INDEX on a schema?

Can't CREATE INDEX on a schema?

From
"Marc G. Fournier"
Date:
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?

From
Frank Wiles
Date:
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?

From
Neil Conway
Date:
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?

From
Andrew Dunstan
Date:
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