Search Postgresql Archives

Re: altering foreign key without a table scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vincent de Phily <vincent.dephily@xxxxxxxxxxxxxxxxx> writes:
> On Thursday 18 August 2011 13:08:18 Jerry Sievers wrote:
>> Your 2 catalog fields of interest are;
>> pg_constraint.(confupdtype|confdeltype)
>> 
>> Changing those for the relevant FKs should satisfy your needs.  I am
>> not aware of those field values being duplicated anywhere.

> 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.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux