Re: contrib idea

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: contrib idea
Дата
Msg-id GNELIHDDFBOCMGBFGEFOEEOJCAAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: contrib idea  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
> > > * 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.

Hmm...not necessarily true.  A default 'no action' foreign key still needs
to prevent the parent key from being deleted if the child exists.  This
requires that postgres do a search of the child table.

> I don't think we want to conditionally create an index. That would
> bee too confusing. A contrib, to find "suggested" indexes seems fine.

That's what I suggested.

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Possible bug in vacuum redo
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Thoughts on the location of configuration files