Re: altering foreign key without a table scan

Поиск
Список
Период
Сортировка
От Vincent de Phily
Тема Re: altering foreign key without a table scan
Дата
Msg-id 4833286.45n85cmKOJ@moltowork
обсуждение исходный текст
Ответ на Re: altering foreign key without a table scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Friday 19 August 2011 12:55:01 Tom Lane wrote:
> Vincent de Phily <vincent.dephily@mobile-devices.fr> writes:
> > On Friday 19 August 2011 11:52:50 Tom Lane wrote:
> >> IIRC, there are fields of pg_constraint that are copied into the
> >> pg_trigger rows for the supporting triggers, so as to save one catalog
> >> lookup at run time.  If you diddle one manually, you'd better diddle
> >> both.
> >
> > Some relid values are indeed duplicated in pg_constraint and pg_trigger,
> > but it doesn't look like I need to fiddle with those ?
> >
> > I'm only touching pg_trigger.tgfoid and
> > pg_constraint.confdeltype/confupdtype (which indeed seem to say the
> > same thing in a different way). Do you know if there is something else
> > I've missed ?
>
> Yeah, that seems to be it except for the deferrable/deferred fields,
> which match up in the obvious way.  I had been thinking the RI triggers
> avoided doing a lookup in pg_constraint, but that was mistaken.  (I
> think we used to store all that info in tgargs, but we evidently don't
> anymore.)

Thanks, I'll look into applying those next week then. If I never get back to
the list about it, it'll mean that it worked without issues :)

--
Vincent de Phily


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: altering foreign key without a table scan
Следующее
От: Mark Morgan Lloyd
Дата:
Сообщение: Listen/notify and ODBC