Re: Postgres views cannot use both union and join/where

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Mithran Kulasekaran <mithranakulasekaran(at)gmail(dot)com>
Cc: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres views cannot use both union and join/where
Date: 2021-10-20 02:56:33
Message-ID: CAHOFxGppNR3m4Dc-1nL-YA-sqWjSWs7JEx7EgoPnPKk_-7c5KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Oct 19, 2021 at 3:48 PM Mithran Kulasekaran <
mithranakulasekaran(at)gmail(dot)com> wrote:

> create view template_view (id, name, description, is_staged) as
> select t.id,t.name, t.description, false as is_staged
> from template t
> left join template_staging ts on t.name = ts.name and ts.name is null
>
>
Does that work? I've only seen that type of logic written as-

left join template_staging ts on t.name = ts.name
where ts.name is null

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David G. Johnston 2021-10-20 03:38:40 Re: Postgres views cannot use both union and join/where
Previous Message Benedict Holland 2021-10-20 02:36:42 Re: Postgres views cannot use both union and join/where