From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Thom Brown <thom@linux.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Dropped index on table preventing rule creation
Date: Tue, 13 Sep 2011 17:31:48 -0400
Message-ID: <12987.1315949508@sss.pgh.pa.us> (raw)
In-Reply-To: <C85619BB-735B-4821-9476-F2F489FD832C@gmail.com>
References: <CAA-aLv7sszmU+Fz-xLo6cOiASUiX0mCRwAMF2FB=2j-5MKqb+A@mail.gmail.com>
<28537.1315715201@sss.pgh.pa.us>
<C85619BB-735B-4821-9476-F2F489FD832C@gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Sep 10, 2011, at 11:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> (IOW, rather than "fix" this I'd prefer to rip out the code altogether.
>> But maybe we should wait a couple more years for that.)
> IIRC, it's not dead code. I think you can still generate such a dump if you use CREATE OR REPLACE VIEW to manufacture a pair of mutually recursive views.
Oh, yeah, I'd forgotten about that. In general that's pg_dump's
strategy for breaking a circular dependency loop that involves a view.
> Now we should probably disallow that, but we currently don't.
Losing that particular case isn't problematic, but I'm not sure that
that's the only possible circularity involving a view. One idea that
comes to mind is
create table foo (list-of-columns);
create function foofunc () returns setof foo as ...;
create rule .... as select * from foofunc();
This only saves somebody from citing the list of column types twice,
so maybe we could blow off this case too; but who's to say there are
not more-useful cases that would create circularities?
regards, tom lane
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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, thom@linux.com
Subject: Re: Dropped index on table preventing rule creation
In-Reply-To: <12987.1315949508@sss.pgh.pa.us>
References: <CAA-aLv7sszmU+Fz-xLo6cOiASUiX0mCRwAMF2FB=2j-5MKqb+A@mail.gmail.com> <28537.1315715201@sss.pgh.pa.us> <C85619BB-735B-4821-9476-F2F489FD832C@gmail.com> <12987.1315949508@sss.pgh.pa.us>
* 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