create unique index schema.index_name on table (column)?

create unique index schema.index_name on table (column)?

am 11.09.2004 22:42:46 von m0ntar3

Is the syntax "schema_name.index_name" for create unique index wrong,
unsupported or what? I know is doesn't work as postgres kicks me back a
syntax error each time (version 7.3.2 & 7.4.5). -sigh-

Re: create unique index schema.index_name on table (column)?

am 12.09.2004 07:48:38 von grzm

On Sep 12, 2004, at 5:42 AM, m0ntar3@cox.net wrote:

> Is the syntax "schema_name.index_name" for create unique index wrong,
> unsupported or what? I know is doesn't work as postgres kicks me back
> a syntax error each time (version 7.3.2 & 7.4.5). -sigh-

Could you give a full example (including the error) of what you're
doing? It's kind of hard to give a suggestion based on your brief
description.

Michael


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Re: create unique index schema.index_name on table (column)?

am 12.09.2004 07:54:33 von grzm

On Sep 12, 2004, at 2:48 PM, Michael Glaesemann wrote:

>
> On Sep 12, 2004, at 5:42 AM, m0ntar3@cox.net wrote:
>
>> Is the syntax "schema_name.index_name" for create unique index wrong,
>> unsupported or what? I know is doesn't work as postgres kicks me back
>> a syntax error each time (version 7.3.2 & 7.4.5). -sigh-
>
> Could you give a full example (including the error) of what you're
> doing? It's kind of hard to give a suggestion based on your brief
> description.

Also, looking quickly at the online docs, we find :

> 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.



Michael


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Re: create unique index schema.index_name on table (column)?

am 12.09.2004 07:55:22 von tgl

m0ntar3@cox.net writes:
> Is the syntax "schema_name.index_name" for create unique index wrong,
> unsupported or what?

Yes.

Put the schema name on the table, instead.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: create unique index schema.index_name on table (column)?

am 12.09.2004 22:33:38 von m0ntar3

I'm working with a closed source application that reads an ASCII file
and as it does it (via ODBC) creates tables and indexes, inserting as it
goes. Like so:

CREATE TABLE bgsuser.CAXCTRLD ( CTRLS INTEGER, INTVL INTEGER);
CREATE UNIQUE INDEX bgsuser.PRIMARY_CAXCTRLD ON bgsuser.CAXCTRLD
(CTRLS,INTVL);
INSERT ...
INSERT ...

The application is designed to work through ODBC and psqlODBC does a
great job. My problem is the username (schema qualifier) on the create
index statement. I've decided it's easiest to copy/paste/modify the
create statements from the ODBC trace logs.. oh, well.

Michael Glaesemann wrote:

>
> On Sep 12, 2004, at 5:42 AM, m0ntar3@cox.net wrote:
>
>> Is the syntax "schema_name.index_name" for create unique index wrong,
>> unsupported or what? I know is doesn't work as postgres kicks me back
>> a syntax error each time (version 7.3.2 & 7.4.5). -sigh-
>
>
> Could you give a full example (including the error) of what you're
> doing? It's kind of hard to give a suggestion based on your brief
> description.
>
> Michael
>
>

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster