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-26 11:01:23
Message-ID: 87plpv1rb0.fsf@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:

Hello Dean,

>> I did have some issue to run 'make html', but the
>> error exists before my patch, so I change the document carefully without
>> testing it. do you know how to fix the below error in 'make html'?
>>
>> $/usr/bin/xsltproc --nonet --path . --path . --stringparam pg.version '18devel' stylesheet.xsl postgres-full.xml
>>
>> I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl
>> warning: failed to load external entity
>> "http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"
..
>
> This looks like you're missing a required package. Try installing
> docbook-xsl or docbook-xsl-stylesheets or something similar (the
> package name varies depending on your distro).

This does work, thank you!

>> 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.

Sorry for the late response, just my new posistion is bit of busy that I
don't have enough time on community work.

--
Best Regards
Andy Fan

Attachment Content-Type Size
v20240826-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 Ashutosh Bapat 2024-08-26 11:04:49 Re: Trim the heap free memory
Previous Message Dean Rasheed 2024-08-26 10:48:03 Re: Optimize mul_var() for var1ndigits >= 8