From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: index on function confuses drop table cascade on child
Date: Tue, 02 Nov 2010 09:29:40 -0500
Message-ID: <4CCFDA0402000025000370DD@gw.wicourts.gov> (raw)
In-Reply-To: <9222.1288658568@sss.pgh.pa.us>
References: <4CCEE02D020000250003708E@gw.wicourts.gov>
<8009.1288654520@sss.pgh.pa.us>
<8009.1288654520@sss.pgh.pa.us>
<9222.1288658568@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 3. Or, perhaps we could change recordDependencyOnSingleRelExpr so
> that it generates a whole-table dependency on the target relation
> even if there are no Vars in the expression. This would make it
> act much more like the regular-query context that
> find_expr_references_walker is expecting --- in essence, since
> we're fabricating a single-element rtable for
> find_expr_references_walker to work with, we should fabricate the
> implied whole-table dependency entry too. But that seems a bit
> weird too, and in particular it's not obvious whether to do that
> if in fact the expression is empty, or doesn't contain any Var at
> all.
This one seems sensible *if* you assume that by the time it is
called there is a known dependency on the particular relation -- for
example, you are dealing with an index on that relation. Is that a
reasonable restriction on the use of the
recordDependencyOnSingleRelExpr function? If this was done, would
it allow simplification of the index_create code you showed in #1?
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, tgl@sss.pgh.pa.us
Subject: Re: index on function confuses drop table cascade on child
In-Reply-To: <4CCFDA0402000025000370DD@gw.wicourts.gov>
References: <4CCEE02D020000250003708E@gw.wicourts.gov> <8009.1288654520@sss.pgh.pa.us> <9222.1288658568@sss.pgh.pa.us> <4CCFDA0402000025000370DD@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox