Re: FETCH FIRST clause WITH TIES option

From: Surafel Temesgen <surafel3000(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Subject: Re: FETCH FIRST clause WITH TIES option
Date: 2020-01-22 06:19:46
Message-ID: CALAY4q9hzE3qE9gQkzFB7Lnh=usK-2Q-s=Ucspsc10EXk+umdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 28, 2019 at 5:49 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> On 2019-Nov-28, Surafel Temesgen wrote:
>
> > On Thu, Nov 28, 2019 at 12:36 AM Alvaro Herrera <
> alvherre(at)2ndquadrant(dot)com>
> > wrote:
> >
> > > I think you should add a /* fall-though */ comment after changing
> state.
> > > Like this (this flow seems clearer; also DRY):
> > >
> > > if (!node->noCount &&
> > > node->position - node->offset >= node->count)
> > > {
> > > if (node->limitOption == LIMIT_OPTION_COUNT)
> > > {
> > > node->lstate = LIMIT_WINDOWEND;
> > > return NULL;
> > > }
> > > else
> > > {
> > > node->lstate = LIMIT_WINDOWEND_TIES;
> > > /* fall-through */
> > > }
> > > }
> > > else
> > > ...
> >
> > changed
>
> But you did not read my code snippet, did you ...?
>

I don't see it. changed to it and rebased to current master

regards
Surafel

Attachment Content-Type Size
fetch-first-with-ties-v15.patch text/x-patch 39.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pengzhou Tang 2020-01-22 06:28:01 Re: Errors when update a view with conditional-INSTEAD rules
Previous Message k.jamison@fujitsu.com 2020-01-22 06:17:33 RE: VACUUM memory management