Re: Extracting data from jsonb array? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Extracting data from jsonb array?
Date
Msg-id CAKFQuwZ92os34XWkHjM9i8mb2bZeLf+RD+p73+0+xAFL56EuNQ@mail.gmail.com
Whole thread Raw
In response to Re: Extracting data from jsonb array?  (Ken Tanzer <ken.tanzer@gmail.com>)
List pgsql-general

On Monday, December 7, 2020, Ken Tanzer <ken.tanzer@gmail.com> wrote:

There's one last piece of this query I'm clearly not getting though.  Where it says:

from foo as f, jsonb_to_recordset(js) as t(key2 text) 

what is actually going on there?  I keep reading this as a table foo (f)  cross-joined to a table created by jsonb_to_recordset (t).  But that doesn't seem right, because rows from t are only joining with matching rows from f, rather than all of them.  Is there some unspoken implicit logic going on here, or something else entirely that is going over my head?

That is the lateral join.


Read the section under from, join, lateral.

David J.

pgsql-general by date:

Previous
From: Ken Tanzer
Date:
Subject: Re: Extracting data from jsonb array?
Next
From: Tom Lane
Date:
Subject: Re: Extracting data from jsonb array?