Re: Re: Added prosupport function for estimating numeric generate_series rows

2024-12-02 Thread Dean Rasheed
On Sat, 30 Nov 2024 at 00:38, tsinghualucky...@foxmail.com wrote: > > Dear Dean Rasheed, I have reviewed the v4 patch and it is very thoughtful and > reasonable, with a very clever attention to detail (plus I am very happy that > we can get rid of the goto, which I was not a big fan of). > > Thi

Re: Re: Added prosupport function for estimating numeric generate_series rows

2024-11-29 Thread tsinghualucky...@foxmail.com
On 2024-11-30, Dean Rasheed wrote: On Fri, 29 Nov 2024 at 13:10, Dean Rasheed wrote: > > There are a couple more things that I think need tidying up. I'll post an > update when I get back to my computer. > Here's an update with some cosmetic tidying up, plus a couple of not-so-cosmetic changes:

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-29 Thread Dean Rasheed
On Fri, 29 Nov 2024 at 13:10, Dean Rasheed wrote: > > There are a couple more things that I think need tidying up. I'll post an > update when I get back to my computer. > Here's an update with some cosmetic tidying up, plus a couple of not-so-cosmetic changes: The new #include wasn't in the rig

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-29 Thread Dean Rasheed
On Fri, 29 Nov 2024, 12:01 David Rowley, wrote: > On Fri, 29 Nov 2024 at 18:50, songjinzhou > wrote: > > Hello, thank you and David Rowley for your comments. > > > > I have used pgindent to adjust the code format and added comments and > missing regression test cases. Here is the patch of versio

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-29 Thread David Rowley
On Fri, 29 Nov 2024 at 18:50, songjinzhou wrote: > Hello, thank you and David Rowley for your comments. > > I have used pgindent to adjust the code format and added comments and missing > regression test cases. Here is the patch of version v3. It looks fine to me. The only things I'd adjust are

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread songjinzhou
> This sort of stuff is best addressed by running the code through > pgindent, rather than fixing it manually. Usually we don't insist > on submitters getting it right; the committer should pgindent it. Hello, thank you and David Rowley for your comments.  I have used pgindent to adjust the

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread Tom Lane
David Rowley writes: > Also a few minor things: > * Missing space after "if" > + if(arg3) > * We always have an empty line after variable declarations, that's missing in: > + NumericVar q; > + init_var(&q); This sort of stuff is best addressed by running the code through pgindent, rather than fix

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread David Rowley
On Fri, 29 Nov 2024 at 06:25, 孤傲小二~阿沐 wrote: > Hello, thank you very much for your attention and guidance. I have modified > and improved the problem you mentioned. The patch of version v2 is attached > below. I've only had a quick look at the patch. * The following needs a DatumGetFloat8():

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread 孤傲小二~阿沐
Hello, thank you very much for your attention and guidance. I have modified and improved the problem you mentioned. The patch of version v2 is attached below.  Regarding regression testing, I implemented it with the help of some facilities of generate_series_timestamp_support last time. Everyt

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread Dean Rasheed
On Thu, 28 Nov 2024 at 07:47, 孤傲小二~阿沐 wrote: > > Hello hackers, I saw a recent submission: Teach planner how to estimate rows > for timestamp generate_series. I provide a patch for the numeric type here, > and a simple test is as follows: > > I really want to know your thoughts, please give me f

Added prosupport function for estimating numeric generate_series rows

2024-11-27 Thread 孤傲小二~阿沐
Hello hackers, I saw a recent submission: Teach planner how to estimate rows for timestamp generate_series. I provide a patch for the numeric type here, and a simple test is as follows: postgres=# explain SELECT * FROM generate_series(-25.0, -1.0, 2.0);                               QUERY PLAN