Re: New function normal_rand_array function to contrib/tablefunc.

From: Andy Fan <zhihuifan1213(at)163(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: New function normal_rand_array function to contrib/tablefunc.
Date: 2024-08-27 08:43:45
Message-ID: 87le0iqrsu.fsf@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andy Fan <zhihuifan1213(at)163(dot)com> writes:

>>> My suggestion would be to mirror the signatures of the core random()
>>> functions more closely, and have this:
>>>
>>> 1). rand_array(numvals int, minlen int, maxlen int)
>>> returns setof float8[]
>>>
> ..>
>>> 4). rand_array(numvals int, minlen int, maxlen int,
>>> minval numeric, maxval numeric)
>>> returns setof numeric[]
>
>> this is indeed a more clean and correct APIs, I will use the above ones
>> in the next version. Thanks for the suggestion.
>
> I followed your suggestion in the new attached version. They are not
> only some cleaner APIs for user and but also some cleaner implementation
> in core, Thank for this suggestion as well.

A new version is attached, nothing changed except replace
PG_GETARG_INT16 with PG_GETARG_INT32. PG_GETARG_INT16 is a copy-paste
error.

--
Best Regards
Andy Fan

Attachment Content-Type Size
v20240827-0001-Add-functions-rand_array-function-to-contr.patch text/x-diff 12.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-08-27 08:45:05 Re: Doc: fix the note related to the GUC "synchronized_standby_slots"
Previous Message Nisha Moond 2024-08-27 08:36:32 Re: Conflict Detection and Resolution