Robert Haas <robertmh...@gmail.com> writes: > On Tue, Jun 7, 2011 at 3:53 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> It might be that it'd be best just to have both the planner and executor >> throwing errors on unlogged tables, rather than rejiggering pieces of >> the planner to sort-of not fail on an unlogged table.
> Mmm, that's not a bad thought either. Although I think if we can be > certain that the planner will error out, the executor checks aren't > necessary. It would disallow preparing a statement and then executing > it after promotion, but that doesn't seem terribly important. Any > idea where to put the check? Well, I'd recommend keeping the test in ExecOpenScanRelation, since it's cheap insurance against the situation changing since the plan was made. But for the planner, why not just put the same kind of test in get_relation_info, just after it does heap_open? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs