Re: Better explanation of unnest with ordinality

2021-01-27 Thread m7o...@gmail.com
On Wed, Jan 27, 2021 at 7:47 PM Tom Lane wrote: > > What is less clear is the definition of UNNEST, for which that text refers > you to 9.19 What about some json functions that return setof, e.g. jsonb_to_recordset (https://www.postgresql.org/docs/13/functions-json.html)? Should we keep the same

Re: Better explanation of unnest with ordinality

2021-01-27 Thread Tom Lane
- writes: > I’ve recently come across a query of the kind: > select * from unnest(array[1,2,3,4]) with ordinality t; > and was asked whether ordinality value is guaranteed to be the same as the > array index of the array element in the same tuple. The only relevant thing > about ordinality colum