From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: pgsql-bugs@lists.postgresql.org
Cc: maxim.boguk@gmail.com, rhaas@postgresql.org, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Subject: Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list"
Date: Tue, 28 Aug 2018 15:23:20 +0100
Message-ID: <87r2iiy3if.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <87a7paz8b1.fsf@news-spur.riddles.org.uk>
References: <153518420278.1478.14875560810251994661@wrigleys.postgresql.org>
<87efemzw0v.fsf@news-spur.riddles.org.uk>
<87a7paz8b1.fsf@news-spur.riddles.org.uk>
>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
Andrew> It seems obviously wrong that a constant pathkey with no actual
Andrew> reference to the foreign table should be being pushed down, so
Andrew> so far I suspect that get_useful_pathkeys_for_relation isn't
Andrew> being selective enough about what is "useful". In this context
Andrew> I find it suspicious that find_em_expr_for_rel will return an
Andrew> expr with no vars as being "for" every rel, since it's just
Andrew> looking for a subset.
Andrew> So this looks to me like an oversight in aa09cd242 (CCing rhaas
Andrew> and Ashutosh accordingly), which changed find_em_expr_for_rel
Andrew> from using bms_equal to bms_is_subset without considering the
Andrew> degenerate case of members with no relids at all. I propose to
Andrew> simply add a !bms_is_empty condition there; anyone have any
Andrew> better idea?
Pushed this.
--
Andrew (irc:RhodiumToad)
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: andrew@tao11.riddles.org.uk, ashutosh.bapat@enterprisedb.com
Subject: Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list"
In-Reply-To: <87r2iiy3if.fsf@news-spur.riddles.org.uk>
References: <153518420278.1478.14875560810251994661@wrigleys.postgresql.org> <87efemzw0v.fsf@news-spur.riddles.org.uk> <87a7paz8b1.fsf@news-spur.riddles.org.uk> <87r2iiy3if.fsf@news-spur.riddles.org.uk>
* 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