Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET
Date
Msg-id CAA5RZ0sG42-Hyes4U9BToNHfxGx8tkW_HuRkQ0pOmmx6Ud7eiw@mail.gmail.com
Whole thread Raw
In response to Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET  (Sami Imseih <samimseih@gmail.com>)
List pgsql-hackers
> transformation.  For these reasons, variant A where we put the
> LimitOption between the two int8 expression nodes feels like the
> "okay" approach here.  But we must document this expectation in the
> structure, and check for more grammar variants of LIMIT and OFFSET
> clauses in pgss.

Please see the attached. Variant A with comments and some additional
test cases.

It should be noted that we currently have "WITH TIES/ROWS ONLY" tests in pg_s_s,
so I added another case to show "FETCH FIRST 2 ROW ONLY" and "LIMIT 2" are
the same queryId and also added a query that uses both a LIMIT and OFFSET.

I could not think of other cases we need to cover.

--

Sami

Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: table_tuple_lock's snapshot argument
Next
From: Tomas Vondra
Date:
Subject: Re: Changing the state of data checksums in a running cluster