Re: Second question on schemas and INDEX(es) ...

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Second question on schemas and INDEX(es) ...
Date: 2003-10-15 20:29:57
Message-ID: 3F8DAE45.1000804@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc G. Fournier wrote:

>Okay, after feeling stupid about the last one (altho I hadn't thought to
>read the CREATE INDEX page, only the CREATE SCHEMA one), I really hate to
>ask this one ... but ... is this documented somewhere also:
>
>CREATE SCHEMA company_00244
> CREATE TABLE traffic ( ip_id int4, port int4, bytes bigint, runtime timestamp )
> CREATE INDEX traffic_dist ON traffic USING BTREE ( ip_id, port )
> CREATE INDEX traffic_time ON traffic USING btree ( hour_trunc(runtime));
>
>ERROR: parser: parse error at or near "INDEX" at character 122
>
>or, is there an obvious error that I'm just not seeing?
>
>The CREATE SCHEMA page shows CREATE TABLE and CREATE VIEW, so should I
>consider CREATE INDEX no supported since it wasn't part of the example?
>
>
>
Again the manual is your friend ... create schema says:

/schema_element/

An SQL statement defining an object to be created within the schema.
Currently, only CREATE TABLE, CREATE VIEW, and GRANT are accepted as
clauses within CREATE SCHEMA. Other kinds of objects may be created
in separate commands after the schema is created

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-10-15 20:34:04 Re: Second question on schemas and INDEX(es) ...
Previous Message Stephan Szabo 2003-10-15 20:21:26 Re: Second question on schemas and INDEX(es) ...