]> granicus.if.org Git - postgresql/commit
Code review for pushing LIMIT through subqueries.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Aug 2017 13:05:17 +0000 (09:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Aug 2017 13:05:17 +0000 (09:05 -0400)
commit3f4c7917b3bc8b421c0c85cb9995974c55e7232b
treedb996d17bee3c728f34978e740a6c05e2818a2ba
parentd36f7efb39e1b9613193b2e12717dbe2418ddae5
Code review for pushing LIMIT through subqueries.

Minor improvements for commit 1f6d515a6.  We do not need the (rather
expensive) test for SRFs in the targetlist, because since v10 any
such SRFs would appear in separate ProjectSet nodes.  Also, make the
code look more like the existing cases by turning it into a simple
recursion --- the argument that there might be some performance
benefit to contorting the code seems unfounded to me, especially since
any good compiler should turn the tail-recursion into iteration anyway.

Discussion: http://postgr.es/m/CADE5jYLuugnEEUsyW6Q_4mZFYTxHxaVCQmGAsF0yiY8ZDggi-w@mail.gmail.com
src/backend/executor/nodeLimit.c