On Mon, Dec 5, 2016 at 6:20 AM, Ashutosh Bapat <ashutosh.ba...@enterprisedb.com> wrote: > 4. I am still not happy with this change > + /* > + * Since (1) the expressions in foreignrel's reltarget doesn't > contain > + * any PHVs and (2) foreignrel's local_conds is empty, the tlist > + * created by build_tlist_to_deparse must be one-to-one with the > + * expressions. > + */ > + Assert(list_length(tlist) == > list_length(foreignrel->reltarget->exprs)); > the assertion only checks that the number of elements in both the lists are > same but does not check whether those lists are same i.e. they contain the > same > elements in the same order. This equality is crucial to deparsing logic. If > somehow build_tlist_to_deparse() breaks that assumption in future, we have no > way to detect it, unless a regression test fails.
If there's an easy way to do a more exact comparison, great. But if we can't get an awesome Assert(), a helpful Assert() is still better than a kick in the head. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers