Re: Poll: are people okay with function/operator table redesign?

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Steven Pousty <steve(dot)pousty(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Pierre Giraud <pierre(dot)giraud(at)dalibo(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Poll: are people okay with function/operator table redesign?
Date: 2020-05-05 09:33:55
Message-ID: CAEZATCWd+KVKvZzt-7sQy6gDXNQe64qEcDKMjNadSEhaLpqwow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 4 May 2020 at 22:22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> * <returnvalue> is also quite sticky about inserting other sorts
> of font-changing environments inside it. As an example, it'll let
> you include <replaceable> but not <type>, which seems pretty weird
> to me. This is problematic in some places where it's desirable to
> have text rather than just a type name, for example
>
> <function>stddev</function> ( <replaceable>numeric_type</replaceable> )
> <returnvalue></returnvalue> <type>double precision</type>
> for <type>real</type> or <type>double precision</type>,
> otherwise <type>numeric</type>
>
> Now I could have done this example by spelling out all six varieties of
> stddev() separately, and maybe I should've, but it seemed overly bulky
> that way.

FWIW, I prefer having each variety spelled out separately. For
example, I really like the new way that aggregates like sum() and
avg() are displayed. To me, having all the types listed like that is
much more readable than having to read and interpret a piece of free
text.

Similarly, for other functions like gcd(), lcm() and mod(). I think it
would be better to get rid of numeric_type, and just list all the
variants of each function.

Regards,
Dean

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-05-05 10:36:17 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Juan José Santamaría Flecha 2020-05-05 08:07:35 Re: PG 13 release notes, first draft