How to just get the last in a recursive query - Mailing list pgsql-sql

From Shaozhong SHI
Subject How to just get the last in a recursive query
Date
Msg-id CA+i5Jwbh6Yy-zW3AX3WLCUJANky9w8HtVo99NPxMAc9APY0zhw@mail.gmail.com
Whole thread Raw
Responses Re: How to just get the last in a recursive query  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-sql


---------- Forwarded message ---------
From: Shaozhong SHI <shishaozhong@gmail.com>
Date: Mon, 4 Apr 2022 at 23:13
Subject: How to just get the last in a recursive query
To: PostGIS Users Discussion <postgis-users@lists.osgeo.org>



3 rows got returns as follows:

 id
---  6  3  1

How to just get the last (namely, 1) in the most efficient way?
Regards, David

pgsql-sql by date:

Previous
From: Steve Midgley
Date:
Subject: Re: How long does iteration over 4-5 million rows usually take?
Next
From: Rob Sargent
Date:
Subject: Re: How to just get the last in a recursive query