Re: SEARCH and CYCLE clauses

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SEARCH and CYCLE clauses
Date: 2020-10-09 10:17:32
Message-ID: CAFj8pRDP8=X6gFz0OUOjAigxAY2L+rekDD0f+jeBGB8C_X9eDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pá 9. 10. 2020 v 11:40 odesílatel Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> napsal:

> On 2020-09-22 20:29, Pavel Stehule wrote:
> > The result is correct. When I tried to use UNION instead UNION ALL, the
> > pg crash
>
> I fixed the crash, but UNION [DISTINCT] won't actually work here because
> row/record types are not hashable. I'm leaving the partial support in,
> but I'm documenting it as currently not supported.
>

I think so UNION is a common solution against the cycles. So missing
support for this specific case is not a nice thing. How much work is needed
for hashing rows. It should not be too much code.

> > looks so clause USING in cycle detection is unsupported for DB2 and
> > Oracle - the examples from these databases doesn't work on PG without
> > modifications
>
> Yeah, the path clause is actually not necessary from a user's
> perspective, but it's required for internal bookkeeping. We could
> perhaps come up with a mechanism to make it invisible coming out of the
> CTE (maybe give the CTE a target list internally), but that seems like a
> separate project.
>
> The attached patch fixes the issues you have reported (also the view
> issue from the other email). I have also moved the whole rewrite
> support to a new file to not blow up rewriteHandler.c so much.
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2020-10-09 10:20:01 Re: Parallel INSERT (INTO ... SELECT ...)
Previous Message Noah Misch 2020-10-09 10:01:17 Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add