Re: Improve join_search_one_level readibilty (one line change)

2023-08-06 Thread David Rowley
On Fri, 4 Aug 2023 at 16:05, Richard Guo wrote: > > > On Fri, Aug 4, 2023 at 10:36 AM David Rowley wrote: >> >> The whole lnext() stuff all feels a bit old now that Lists are arrays. >> I think we'd be better adjusting the code to pass the List index where >> we start from rather than the

Re: Improve join_search_one_level readibilty (one line change)

2023-08-03 Thread Richard Guo
On Fri, Aug 4, 2023 at 10:36 AM David Rowley wrote: > The whole lnext() stuff all feels a bit old now that Lists are arrays. > I think we'd be better adjusting the code to pass the List index where > we start from rather than the ListCell to start from. That way we can > use for_each_from() to

Re: Improve join_search_one_level readibilty (one line change)

2023-08-03 Thread David Rowley
On Tue, 1 Aug 2023 at 01:48, Julien Rouhaud wrote: > Apart from that +1 from me for the patch, I think it helps focusing the > attention on what actually matters here. I think it's worth doing something to improve this code. However, I think we should go a bit further than what the proposed

Re: Improve join_search_one_level readibilty (one line change)

2023-07-31 Thread Julien Rouhaud
Hi, On Wed, Jun 07, 2023 at 11:02:09AM +0800, 謝東霖 wrote: > Thank you, Julien, for letting me know that cfbot doesn't test txt files. > Much appreciated! Thanks for posting this v2! So unsurprisingly the cfbot is happy with this patch, since it doesn't change the behavior at all. I just have

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread Tristan Partin
On Wed Jun 7, 2023 at 10:05 AM CDT, 謝東霖 wrote: > Peter Eisentraut > > That shows exactly the problem being complained about. > > I apologize for not using the correct MIME type in my previous email > to the pg-hackers mailing list. Upon sending the first email, I > realized that my patch was

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread 謝東霖
Peter Eisentraut > That shows exactly the problem being complained about. I apologize for not using the correct MIME type in my previous email to the pg-hackers mailing list. Upon sending the first email, I realized that my patch was labeled as "application/x-patch" instead of "text/x-patch."

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread Peter Eisentraut
On 04.06.23 08:02, Julien Rouhaud wrote: Additionally, if anyone has any tips on ensuring that Gmail recognizes my attached patches as the "text/x-patch" MIME type when sending them from the Chrome client, I would be grateful for the advice. I don't see any problem with the attachment. You can

Re: Improve join_search_one_level readibilty (one line change)

2023-06-06 Thread 謝東霖
Thank you, Julien, for letting me know that cfbot doesn't test txt files. Much appreciated! v2-0001-Improve-left-deep-tree-dp-algorithm-s-readability.patch Description: Binary data

Re: Improve join_search_one_level readibilty (one line change)

2023-06-06 Thread Tom Lane
Julien Rouhaud writes: > I'm glad I could help! Thanks for creating the cf entry. Note however that > the cfbot ignores files with a .txt extension (I don't think it's > documented but it will mostly handle files with diff, patch, gz(ip), tar > extensions IIRC, processing them as needed depending

Re: Improve join_search_one_level readibilty (one line change)

2023-06-06 Thread Julien Rouhaud
On Tue, 6 Jun 2023, 16:18 謝東霖, wrote: > Thank you to Julien Rouhaud and Tender Wang for the reviews. > > Julien's detailed guide has proven to be incredibly helpful, and I am > truly grateful for it. > Thank you so much for providing such valuable guidance! > > I have initiated a new commitfest:

Re: Improve join_search_one_level readibilty (one line change)

2023-06-06 Thread 謝東霖
Thank you to Julien Rouhaud and Tender Wang for the reviews. Julien's detailed guide has proven to be incredibly helpful, and I am truly grateful for it. Thank you so much for providing such valuable guidance! I have initiated a new commitfest: https://commitfest.postgresql.org/43/4346/

Re: Improve join_search_one_level readibilty (one line change)

2023-06-05 Thread tender wang
謝東霖 于2023年6月3日周六 23:21写道: > Hello hackers > > Attached is my first patch for PostgreSQL, which is a simple one-liner > that I believe can improve the code. > > In the "join_search_one_level" function, I noticed that the variable > "other_rels_list" always refers to "joinrels[1]" even when the

Re: Improve join_search_one_level readibilty (one line change)

2023-06-04 Thread Julien Rouhaud
Hi, On Sat, Jun 03, 2023 at 05:24:43PM +0800, 謝東霖 wrote: > > Attached is my first patch for PostgreSQL, which is a simple one-liner > that I believe can improve the code. Welcome! > In the "join_search_one_level" function, I noticed that the variable > "other_rels_list" always refers to

Improve join_search_one_level readibilty (one line change)

2023-06-03 Thread 謝東霖
Hello hackers Attached is my first patch for PostgreSQL, which is a simple one-liner that I believe can improve the code. In the "join_search_one_level" function, I noticed that the variable "other_rels_list" always refers to "joinrels[1]" even when the (level == 2) condition is met. I propose