Re: altering foreign key without a table scan

From: Vincent de Phily <vincent(dot)dephily(at)mobile-devices(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jerry Sievers <gsievers19(at)comcast(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: altering foreign key without a table scan
Date: 2011-08-19 16:09:25
Message-ID: 22270524.vDhmFqSqtK@moltowork
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 19 August 2011 11:52:50 Tom Lane wrote:
> Vincent de Phily <vincent(dot)dephily(at)mobile-devices(dot)fr> writes:
> > Thanks for your answer. Experimenting a bit, those columns seem to have
> > only a cosmetic impact, meaning that "\d" will show the schema you
> > expect, but the behaviour remains unchanged (even after restarting
> > postgres).
>
> > Digging further however, I found that pg_triggers can be used for my means
> > :
> 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 ?

Thanks.

--
Vincent de Phily

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-08-19 16:44:40 Re: Need linux uid in pg-psql
Previous Message Gauthier, Dave 2011-08-19 16:07:41 Re: Need linux uid in pg-psql