pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
To: Pavel Stehule <pavel.stehule@gmail.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SEARCH and CYCLE clauses
Date: Tue, 27 Oct 2020 22:31:19 +0300
Message-ID: <29af2c49-5f85-a7d4-7d5b-e35aab1c5357@postgrespro.ru> (raw)
In-Reply-To: <CAFj8pRA-QXp7Tww-MewF3WsARSm-GC0kY-+Wu_yY7gYLKZzHHw@mail.gmail.com>
References: <db80ceee-6f97-9b4a-8ee8-3ba0c58e5be2@2ndquadrant.com>
	<CAFj8pRD8hn1vEdX+EMXQ2hz2pkfyJ2a9cV6R8mbaLYn-MRexdQ@mail.gmail.com>
	<52beaf44-ccc3-0ba1-45c7-74aa251cd6ab@2ndquadrant.com>
	<CAFj8pRDP8=X6gFz0OUOjAigxAY2L+rekDD0f+jeBGB8C_X9eDQ@mail.gmail.com>
	<CAFj8pRA-QXp7Tww-MewF3WsARSm-GC0kY-+Wu_yY7gYLKZzHHw@mail.gmail.com>

On 10.10.2020 08:25, Pavel Stehule wrote:
> Hi
>
> pá 9. 10. 2020 v 12:17 odesílatel Pavel Stehule 
> <pavel.stehule@gmail.com <mailto:pavel.stehule@gmail.com>> napsal:
>
>
>
>     pá 9. 10. 2020 v 11:40 odesílatel Peter Eisentraut
>     <peter.eisentraut@2ndquadrant.com
>     <mailto:peter.eisentraut@2ndquadrant.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
>
>
> This patch is based on transformation CYCLE and SEARCH clauses to 
> specific expressions - it is in agreement with ANSI SQL
>
> There is not a problem with compilation
> Nobody had objections in discussion
> There are enough regress tests and documentation
> check-world passed
> doc build passed
>
> I'll mark this patch as ready for committer
>
> Possible enhancing for this feature (can be done in next steps)
>
> 1. support UNION DISTINCT
> 2. better compatibility with Oracle and DB2 (USING clause can be optional)
>
> Regards
>
> Pavel
>
>
>
>
Status update for a commitfest entry.
According to cfbot patch no longer applies. So I moved it to waiting on 
author.

-- 
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

view thread (27+ messages)  latest in thread

Message-ID: <29af2c49-5f85-a7d4-7d5b-e35aab1c5357@postgrespro.ru>
Permalink:  ../29af2c49-5f85-a7d4-7d5b-e35aab1c5357@postgrespro.ru/
Also on:    postgresql.org/message-id/29af2c49-5f85-a7d4-7d5b-e35aab1c5357@postgrespro.ru

 · 

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-hackers@postgresql.org
  Cc: a.lubennikova@postgrespro.ru, pavel.stehule@gmail.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: SEARCH and CYCLE clauses
  In-Reply-To: <29af2c49-5f85-a7d4-7d5b-e35aab1c5357@postgrespro.ru>

* 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