Re: dropping datumSort field

2022-08-09 Thread Zhihong Yu
On Tue, Aug 9, 2022 at 9:04 PM David Rowley wrote: > On Wed, 10 Aug 2022 at 03:16, Zhihong Yu wrote: > > On Tue, Aug 9, 2022 at 8:01 AM Robert Haas > wrote: > >> > >> One problem with this patch is that, if I apply it, PostgreSQL does not > compile: > >> > >> nodeSort.c:197:6: error: use of

Re: dropping datumSort field

2022-08-09 Thread David Rowley
On Wed, 10 Aug 2022 at 03:16, Zhihong Yu wrote: > On Tue, Aug 9, 2022 at 8:01 AM Robert Haas wrote: >> >> One problem with this patch is that, if I apply it, PostgreSQL does not >> compile: >> >> nodeSort.c:197:6: error: use of undeclared identifier 'tupDesc' >> if (tupDesc->natts == 1)

Re: dropping datumSort field

2022-08-09 Thread Robert Haas
On Tue, Aug 9, 2022 at 11:42 AM Zhihong Yu wrote: > Though the datumSort field may be harmless for now, in the future, the (auto) > alignment padding may not work if more fields are added to the struct. > I think we should always leave some room in struct's for future expansion. I doubt the

Re: dropping datumSort field

2022-08-09 Thread Zhihong Yu
On Tue, Aug 9, 2022 at 8:24 AM Robert Haas wrote: > On Tue, Aug 9, 2022 at 11:16 AM Zhihong Yu wrote: > > tupDesc is declared inside `if (!node->sort_Done)` block whereas the > last reference to tupDesc is outside the if block. > > Yep. > > > I take your review comment and will go back to do

Re: dropping datumSort field

2022-08-09 Thread Robert Haas
On Tue, Aug 9, 2022 at 11:16 AM Zhihong Yu wrote: > tupDesc is declared inside `if (!node->sort_Done)` block whereas the last > reference to tupDesc is outside the if block. Yep. > I take your review comment and will go back to do more homework. The real point for me here is you haven't

Re: dropping datumSort field

2022-08-09 Thread Zhihong Yu
On Tue, Aug 9, 2022 at 8:01 AM Robert Haas wrote: > On Mon, Aug 8, 2022 at 5:51 PM Zhihong Yu wrote: > > Hi, > > I was looking at ExecSort() w.r.t. datum sort. > > > > I wonder if the datumSort field can be dropped. > > Here is a patch illustrating the potential simplification. > > > > Please

Re: dropping datumSort field

2022-08-09 Thread Robert Haas
On Mon, Aug 8, 2022 at 5:51 PM Zhihong Yu wrote: > Hi, > I was looking at ExecSort() w.r.t. datum sort. > > I wonder if the datumSort field can be dropped. > Here is a patch illustrating the potential simplification. > > Please take a look. One problem with this patch is that, if I apply it,

dropping datumSort field

2022-08-08 Thread Zhihong Yu
Hi, I was looking at ExecSort() w.r.t. datum sort. I wonder if the datumSort field can be dropped. Here is a patch illustrating the potential simplification. Please take a look. Thanks drop-datum-sort-field.patch Description: Binary data