Skip site navigation (1) Skip section navigation (2)

Re: Indexes

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Laura Castro <laura(at)alfa21(dot)com>
Cc: PostgresSQL ODBC mailing list <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Indexes
Date: 2002-07-25 07:48:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Laura Castro wrote:
>   I'm trying to perform a massive load on a postgreSQL database
> from ODBC, but I've found that if the table contains a 'PRIMARY
> KEY' constraint, the sql-insert sentences from my program fail.
> I've also noticed that after creating the table, the ODBC driver
> (unixODBC) warnings me this way:
>   NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index for table
>   so I think if I could `deactivate' the index before doing the massive
> load it could possibly work, but I can't find the way of deactivating
> indexes looking at the documentation. Can this be done? 

Unfortunately no.

> If not, any idea
> about another suitable solution?

You can drop the index before doing the massive load and
can create a unique index with the same name after it.
The only difference is that pg_index.inidisprimary is
set to true or not.

Hiroshi Inoue

In response to

  • Indexes at 2002-07-24 09:44:27 from Laura Castro

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2002-07-25 08:29:25
Subject: Re: Write Conflict
Previous:From: Moez HielmyDate: 2002-07-25 02:10:30
Subject: Write Conflict

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group