Re: INSERT/SELECT and excessive foreign key checks - Mailing list pgsql-hackers

From Webb Sprague
Subject Re: INSERT/SELECT and excessive foreign key checks
Date
Msg-id b11ea23c0708191029g4171db5fwdb04f27b18e259ad@mail.gmail.com
Whole thread Raw
In response to Re: INSERT/SELECT and excessive foreign key checks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: INSERT/SELECT and excessive foreign key checks  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
>  ... People keep proposing variants of the idea
> that the executor should optimize updates on the basis of examining
> the query tree to see whether columns changed or not, and they're always
> wrong.  You don't know what else might have been done to the row by
> BEFORE triggers.

Is there a different potential hack for marking a table read-only,
turning it on and off with a function()?  In a hackish vein, use a
trigger to enforce this, and maybe  a rule that can do the
optimization?

I wouldn't be the one writing this, so maybe it is ridiculous and I
apologize for contributing to list-noise, but perhaps it would be
useful for those tables that change so rarely.

Of course, it would be a "contrib" package and nothing for the core.

-w


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] COPYable logs
Next
From: Gregory Stark
Date:
Subject: Re: INSERT/SELECT and excessive foreign key checks