Re: How does postgres store the join predicate for a relation in a given query

From: Gourav Kumar <gourav1905(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How does postgres store the join predicate for a relation in a given query
Date: 2017-10-12 18:59:51
Message-ID: CAPzqDmgXvQ9qvQCzsD5kQnkYSBJy0Cu1T_SnrJu9rTpAmiy71Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A Join clause/predicate will only mention 2 relations. It can't have 3 or
more relations.

On 12 October 2017 at 23:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Gourav Kumar <gourav1905(at)gmail(dot)com> writes:
> > My objective is to construct join graph from a given query.
> > A join graph, has a node for each relation involved in a join, and an
> edge
> > between two relations if they share a join predicate among them.
>
> Hm, well, you could adapt the logic in have_relevant_joinclause() and
> have_relevant_eclass_joinclause(). Or maybe you could just use them
> as-is ... depends on what you have in mind to do with join clauses
> that mention 3 or more relations.
>
> regards, tom lane
>

--
Thanks,
Gourav Kumar
Computer Science and Automation
Indian Institute of Science

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-10-12 19:08:10 Re: postgres_fdw super user checks
Previous Message Robert Haas 2017-10-12 18:59:31 Re: Parallel Append implementation