From: | "Nasby, Jim" <nasbyj(at)amazon(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Super PathKeys (Allowing sort order through precision loss functions) |
Date: | 2018-10-31 23:02:07 |
Message-ID: | 1B1681C7-5DAC-44E1-B4EA-E12509BA1A7F@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Oct 30, 2018, at 9:08 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
> On Tue, 30 Oct 2018 at 07:58, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>
> I've started working on something I've ended up calling "Super
> PathKeys". The idea here is to increase the likelihood of a Path with
> PathKeys being used for a purpose that requires a less strict sort
> order due to ordering being required from the return value of some
> precision loss function.
>
> Anything left anchored would benefit, so SUBSTR(), TRIM() etc
>
> Main use for this would be where the partition condition is a function, so we can still order by partitions easily.
This would also be very helpful in many BI cases; it’s very common to aggregate based on year, year/month, year/quarter, etc.
The other thing that would be extremely useful would be pushing predicats through this, so you could do things like
WHERE date_trunc(‘year’, timestamp_field) = 2018
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2018-10-31 23:11:16 | Re: Super PathKeys (Allowing sort order through precision loss functions) |
Previous Message | Nasby, Jim | 2018-10-31 22:48:53 | Re: PostgreSQL Limits and lack of documentation about them. |