Re: postgresql how to duplicate rows in result.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: Alessandro Baggi <alessandro(dot)baggi(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgresql how to duplicate rows in result.
Date: 2017-02-16 16:27:38
Message-ID: CAKFQuwbe3iRwLm-gWmWxzvzh5s4QkYGmD_3yH051vi7VJx5DaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 16, 2017 at 9:16 AM, Steve Crawford <
scrawford(at)pinpointresearch(dot)com> wrote:

> For my enlightenment, why use LATERAL here? I get the same result with a
> simple CROSS JOIN (though overall I like the clever solution).
>
>
​To be explicit, I think. CROSS JOIN function() implies lateral in the
implementation but you can always specify it if desired. Like saying LEFT
OUTER JOIN instead of LEFT JOIN

If it wasn't lateral the reference to number in "generate_series(1,
number)" would fail.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Bellis 2017-02-16 16:45:35 Re: Autovacuum stuck for hours, blocking queries
Previous Message Steve Crawford 2017-02-16 16:16:24 Re: postgresql how to duplicate rows in result.