FETCH FIRST clause PERCENT option - Mailing list pgsql-hackers

From Surafel Temesgen
Subject FETCH FIRST clause PERCENT option
Date
Msg-id CALAY4q9Esidbuz4fvUrGA-uOHNwbEsntLZQ8p=_okDvaTzJ3pA@mail.gmail.com
Whole thread Raw
Responses Re: FETCH FIRST clause PERCENT option
List pgsql-hackers

FETCH FIRST with PERCENT option is SQL standard that state limit count to be specified in a percentage in addition to specify it in exact count and listed as one of Major features simply not implemented yet in recent wiki page [1].

I implemented it by executing the query plan twice. One without limit filter to find the total number of row that will be feed to limit node so the exact limit count can be calculated and the query plan execute again with limit filter with newly calculated exact count .


[1].https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard


Regards

Surafel

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: C99 compliance for src/port/snprintf.c
Next
From: Andres Freund
Date:
Subject: Re: FETCH FIRST clause PERCENT option