public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Markus Demleitner <[email protected]>
Cc: [email protected]
Subject: Re: Index not used in certain nested views but not in others
Date: Tue, 13 May 2025 11:06:31 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <20250513144811.enpwh6sm5klsbkoc@victor>
References: <20250430151647.7kootztymzznydn5@victor>
<[email protected]>
<[email protected]>
<20250512141217.4dwnfxbaf53mhvi7@victor>
<[email protected]>
<20250513144811.enpwh6sm5klsbkoc@victor>
Markus Demleitner <[email protected]> writes:
> On Tue, May 13, 2025 at 10:12:46AM -0400, Tom Lane wrote:
>> Oh, well, that's your problem. The source tables' column types
>> need to match. Otherwise the UNIONs don't get flattened and you
>> don't get indexscans.
> Ahhhh... *source* tables. Sure, once I'm out of desperation stun, it
> kind of is unsurprising that the casts won't help me when it's about
> pulling up the original tables.
> Just to be sure: int and bigint don't mix, and neither do real and
> double precision, right?
[ checks code... ] Have to be the same datatype, but it looks like
we don't care about typmod (eg, varchar max length) or collations.
(hmm ... I'm wondering if nondeterministic collations have broken
this ...)
> And the lazybone in me can't resist asking:
> there's absolutely no way around this?
It would be a good bit of work, for sure.
regards, tom lane
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Index not used in certain nested views but not in others
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox