public inbox for [email protected]  
help / color / mirror / Atom feed
From: Markus Demleitner <[email protected]>
To: [email protected]
Subject: Re: Index not used in certain nested views but not in others
Date: Tue, 13 May 2025 16:48:11 +0200
Message-ID: <20250513144811.enpwh6sm5klsbkoc@victor> (raw)
In-Reply-To: <[email protected]>
References: <20250430151647.7kootztymzznydn5@victor>
	<[email protected]>
	<[email protected]>
	<20250512141217.4dwnfxbaf53mhvi7@victor>
	<[email protected]>

Dear Tom,

On Tue, May 13, 2025 at 10:12:46AM -0400, Tom Lane wrote:
> Markus Demleitner <[email protected]> writes:
> >   SELECT
> >     CAST(ssa_dstype AS text) AS dataproduct_type,
> >     CAST(NULL AS text) AS dataproduct_subtype,
> >     CAST(2 AS smallint) AS calib_level,
> >     ...
>
> 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?  And the lazybone in me can't resist asking:
there's absolutely no way around this?

Thanks for setting my head straight,

         Markus







view thread (2+ messages)

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]
  Subject: Re: Index not used in certain nested views but not in others
  In-Reply-To: <20250513144811.enpwh6sm5klsbkoc@victor>

* 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