Dear Tom,

On Tue, May 13, 2025 at 10:12:46AM -0400, Tom Lane wrote:
> Markus Demleitner <msdem...@ari.uni-heidelberg.de> 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



Reply via email to