On Thu, 29 Mar 2007, Dave Page wrote:
> Jeremy Drake wrote
> >
> > The problem seems to be that the trigger information is overlaid on the
> > index scan in the graph, resulting in an unreadable mess of text.
> >
>
> Looks like it. Can you provide me a self contain test case please?
Sure. Here's a simple schema to demonstrate the problem:
CREATE TABLE tbl1
(
tbl1id integer NOT NULL PRIMARY KEY
);
CREATE TABLE tbl2
(
tbl2id integer NOT NULL PRIMARY KEY,
tbl1id integer NOT NULL REFERENCES tbl1(tbl1id) ON DELETE CASCADE
);
INSERT INTO tbl1(tbl1id) SELECT x from generate_series(0,4) t(x);
INSERT INTO tbl2(tbl1id, tbl2id) SELECT tbl1id, x + tbl1id*5 FROM
tbl1, generate_series(0,4) t(x);
In the query window, make sure the explain analyze option is on and ask it
to explain the query:
DELETE FROM tbl1 WHERE tbl1id BETWEEN 1 AND 3;
--
There are people so addicted to exaggeration
that they can't tell the truth without lying.
-- Josh Billings