| From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
|---|---|
| To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Cc: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: CLUSTER sort on abbreviated expressions is broken |
| Date: | 2022-04-12 18:01:10 |
| Message-ID: | CAH2-Wzk9qO=zfRgwM4p19hQ=+fMij5hXHwtBWHmBCnws=9WKdw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Apr 3, 2022 at 4:34 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> I probably should have made it clearer in the commit message,
> cc58eecc5 doesn't fix this problem in the master branch. It only
> fixes the code that incorrectly assumed that datum1 was always
> available.
Attached patch fixes the issue, and includes the test case that you posted.
There is only a one line change to tuplesort.c. This is arguably the
same bug -- abbreviation is just another "haveDatum1 optimization"
that needs to be accounted for.
--
Peter Geoghegan
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-CLUSTER-sort-on-abbreviated-expressions.patch | application/octet-stream | 3.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2022-04-12 18:03:06 | Re: make MaxBackends available in _PG_init |
| Previous Message | Andres Freund | 2022-04-12 17:44:27 | Re: make MaxBackends available in _PG_init |