Re: pg_stats and range statistics

Gregory Stark (as CFM) <stark.cfm@gmail.com>

From: "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
To: Egor Rogov <e.rogov@postgrespro.ru>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, "Gregory Stark (as CFM)" <stark.cfm@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, Soumyadeep Chakraborty <soumyadeep2007@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-04-03T21:10:00Z
Lists: pgsql-hackers

Attachments

On Fri, 24 Mar 2023 at 14:48, Egor Rogov <e.rogov@postgrespro.ru> wrote:
>
> Done.

> There is one thing I'm not sure what to do about. This check:
>
>       if (typentry->typtype != TYPTYPE_RANGE)
>           ereport(ERROR,
>                   (errcode(ERRCODE_DATATYPE_MISMATCH),
>                    errmsg("expected array of ranges")));
>
> doesn't work, because the range_get_typcache() call errors out first
> ("type %u is not a range type"). The message doesn't look friendly
> enough for user-faced SQL function. Should we duplicate
> range_get_typcache's logic and replace the error message?

> Okay. I've corrected the examples a bit.

It sounds like you've addressed Tomas's feedback and still have one
open question.

Fwiw I rebased it, it seemed to merge fine automatically.

I've updated the CF entry to Needs Review. But at this late date it
may have to wait until the next release.




-- 
Gregory Stark
As Commitfest Manager

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Collect and use histograms of lower and upper bounds for range types.