From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Laura Castro <laura@alfa21.com>
Cc: PostgresSQL ODBC mailing list <pgsql-odbc@postgresql.org>
Subject: Re: Indexes
Date: Thu, 25 Jul 2002 16:48:15 +0900
Message-ID: <3D3FAD3F.289ED75E@tpf.co.jp> (raw)
References: <Pine.LNX.4.44.0207241136250.25330-100000@dugtrio.alfa21.com>
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.
regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: Inoue@tpf.co.jp, laura@alfa21.com
Subject: Re: Indexes
In-Reply-To: <3D3FAD3F.289ED75E@tpf.co.jp>
References: <Pine.LNX.4.44.0207241136250.25330-100000@dugtrio.alfa21.com> <3D3FAD3F.289ED75E@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox