Re: INSERT/SELECT and excessive foreign key checks

From: "Webb Sprague" <webb(dot)sprague(at)gmail(dot)com>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: INSERT/SELECT and excessive foreign key checks
Date: 2007-08-19 17:29:50
Message-ID: b11ea23c0708191029g4171db5fwdb04f27b18e259ad@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-08-19 18:39:32 Re: INSERT/SELECT and excessive foreign key checks
Previous Message Tom Lane 2007-08-19 16:58:44 Re: [PATCHES] COPYable logs