pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Glen Parker <glenebob@nwlink.com>
To: pgsql-general@postgresql.org
Subject: Dropping column silently kills multi-coumn index (was [ODBC] Error when accessing tables with deleted columns)
Date: Wed, 29 Jan 2003 14:47:04 -0800
Message-ID: <02a501c2c7e8$5d6fe6f0$0b01a8c0@saturn> (raw)
In-Reply-To: <20030129221951.37439.qmail@web10703.mail.yahoo.com>

The other discussion made me try this out:

> So the new dll did take out the delete column.  I
> assume that if you do a drop column that it removes
> the associated index.

(Obviously 7.3.* is involved here...)

I did the following:

oms=# create table __temp1(field1 varchar(10), field2 varchar(10));
CREATE TABLE
oms=# create index __idx_temp1 on __temp1 (field1, field2);
CREATE INDEX
oms=# alter table __temp1 drop column field2;
ALTER TABLE

Note that the ALTER TABLE query succeeded *quietly* and did in fact drop
the index.

Is this intended behavior?  Rather seems like it should refuse to drop
an indexed column, or at least refuse to drop a culumn that's a member
of a multi-culumm index and give notice when an index is dropped.  I
think I'd opt for the never-drop-an-indexed-column approach.

Just an observation :-)

Glen Parker
glenebob@nwlink.com





view thread (2+ messages)  latest in thread

Message-ID: <02a501c2c7e8$5d6fe6f0$0b01a8c0@saturn>
Permalink:  ../02a501c2c7e8$5d6fe6f0$0b01a8c0@saturn/
Also on:    postgresql.org/message-id/02a501c2c7e8$5d6fe6f0$0b01a8c0@saturn

 · 

reply

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: glenebob@nwlink.com, pgsql-general@postgresql.org
  Subject: Re: Dropping column silently kills multi-coumn index (was [ODBC] Error when accessing tables with deleted columns)
  In-Reply-To: <02a501c2c7e8$5d6fe6f0$0b01a8c0@saturn>
  References: <20030129221951.37439.qmail@web10703.mail.yahoo.com> <02a501c2c7e8$5d6fe6f0$0b01a8c0@saturn>

* 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