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

Re: contrib idea

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: contrib idea
Date: 2001-12-21 21:44:16
Message-ID: 20011221134314.M92245-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, 21 Dec 2001, Zeugswetter Andreas SB SD wrote:

>
> > > If you have a foreign key on a column, then whenever the primary key is
> > > modified, the following checks may occur:
> > >
> > > * Check to see if the child row exists (no action)
> > > * Delete the child row (cascade delete)
> > > * Update the child row (cascade update)
> > >
> > > All of which will benefit from an index...
> >
> > OK, then perhaps we should be creating an index automatically?  Folks?
>
> The index is only useful where you actually have an on delete or on update
> clause. I don't think we want to conditionally create an index. That would
> bee too confusing. A contrib, to find "suggested" indexes seems fine.

Actually, even without an on delete or on update it would be used (for the
check to see if there was a row to prevent the action), however autocreate
seems bad.  The contrib thing sounds cool, another vote that way.



In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-12-22 08:30:47
Subject: Re: contrib idea
Previous:From: Hannu KrosingDate: 2001-12-21 21:31:12
Subject: Re: 7.2 is slow?

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