Re: New function normal_rand_array function to contrib/tablefunc.

From: Andy Fan <zhihuifan1213(at)163(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, 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-28 04:27:16
Message-ID: 87zfox2rx7.fsf@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Japin Li <japinli(at)hotmail(dot)com> writes:

> Thanks for updating the patch. Here are some comments.
>
> + if (minlen >= maxlen)
> + ereport(ERROR,
> + (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> + errmsg("minlen must be greater than maxlen.")));
>
> There error message should be "minlen must be smaller than maxlen", right?
>
> + if (minlen < 0)
> + ereport(ERROR,
> + (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> + errmsg("minlen and maxlen must be greater than zero.")));
>
> Here the minlen might be zero, so the error message is incorrect.
> How about use "minlen must be greater than or equal to zero"?

Yes, you are right. A new version is attached, thanks for checking!

--
Best Regards
Andy Fan

Attachment Content-Type Size
v20240828-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 Thomas Munro 2024-08-28 04:45:45 Re: Streaming read-ready sequential scan code
Previous Message shveta malik 2024-08-28 04:27:07 Re: Conflict Detection and Resolution