pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: xinwen@stu.scu.edu.cn
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17700: An assert failed in prepjointree.c
Date: Mon, 28 Nov 2022 21:24:13 -0500
Message-ID: <793071.1669688653@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs49E2VtKdG=T0aPC0_DsO1x2yf1nmxxVaxEwQ58k6aCRyQ@mail.gmail.com>
References: <17700-2b5c10d917c30687@postgresql.org>
	<CAMbWs4-VqpU4qBmO6Ktrt0Ur5OuV7OgZuDEx2GuVCajFrV6xAA@mail.gmail.com>
	<556194.1669649617@sss.pgh.pa.us>
	<627613.1669652527@sss.pgh.pa.us>
	<CAMbWs4_68Hh9CSnCPhHy0eHmsJcGMiDRxswQfMT0SjxmB=EB2w@mail.gmail.com>
	<CAMbWs49E2VtKdG=T0aPC0_DsO1x2yf1nmxxVaxEwQ58k6aCRyQ@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
> BTW, for the test case

> +explain (verbose, costs off)
> +with ctetable as not materialized ( select 1 as f1 )
> +select * from ctetable c1
> +where f1 in ( select c3.f1 from ctetable c2 full join ctetable c3 on true
> );

> Actually we just need to keep 'c3' in a join's nullable side to have the
> PHV created.  So we don't have to use full join in the subquery.  A left
> join would do.

Actually, the planner reduces the full join to left join anyway;
if it did not, it wouldn't be able to reach the code in question.
I think this formulation is fine because it tests that step along
with the bug proper.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <793071.1669688653@sss.pgh.pa.us>
Permalink:  ../793071.1669688653@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/793071.1669688653@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, daniel@yesql.se, xinwen@stu.scu.edu.cn, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17700: An assert failed in prepjointree.c
  In-Reply-To: <793071.1669688653@sss.pgh.pa.us>

* 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