Re: Clarify the ordering guarantees in combining queries (or lack thereof) - Mailing list pgsql-docs

From Shay Rojansky
Subject Re: Clarify the ordering guarantees in combining queries (or lack thereof)
Date
Msg-id CADT4RqCLZS+n9Ar5mdL6H9iZPia2yqGFHVihWOh3L4zSPYvCbA@mail.gmail.com
Whole thread Raw
In response to Re: Clarify the ordering guarantees in combining queries (or lack thereof)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Clarify the ordering guarantees in combining queries (or lack thereof)
List pgsql-docs
>> No, there is no guarantee. It's just that UNION ALL works this way today
>> (preserving the order of the subselects) - and I'm not even sure about
>> that, it may not preserve the order in all cases, with different indexes or
>> partitioning or a parallel plan, etc.
>
> Yeah, that.  You can get a parallelized plan today for UNION ALL:

...

Since the documentation doesn't make a guarantee there is none.

Thanks all for the confirmation.

I'd still suggest documenting the lack of guarantee; yes, mathematically it may be correct to not document lack of guarantees, but users can come with various expectations and misunderstandings (I also wasn't clear on this specifically for UNION ALL), and it's always good to say this kind of thing explicitly.

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: pg_advisory_unlock(null)
Next
From: Bruce Momjian
Date:
Subject: Re: How to reference the type of lock in the documentation.