public inbox for [email protected]  
help / color / mirror / Atom feed
From: Shaozhong SHI <[email protected]>
To: pgsql-sql <[email protected]>
Subject: How to just get the last in a recursive query
Date: Mon, 4 Apr 2022 23:14:22 +0100
Message-ID: <CA+i5Jwbh6Yy-zW3AX3WLCUJANky9w8HtVo99NPxMAc9APY0zhw@mail.gmail.com> (raw)
In-Reply-To: <CA+i5JwbAz1nO_yVtfBfDeJwk8NmEQ_8bC15cOEMyc_j_Zi70Jg@mail.gmail.com>
References: <CA+i5JwbAz1nO_yVtfBfDeJwk8NmEQ_8bC15cOEMyc_j_Zi70Jg@mail.gmail.com>

---------- Forwarded message ---------
From: Shaozhong SHI <[email protected]>
Date: Mon, 4 Apr 2022 at 23:13
Subject: How to just get the last in a recursive query
To: PostGIS Users Discussion <[email protected]>


In this example, Network Walking in PostGIS ยท Paul Ramsey
(cleverelephant.ca)
<http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html;

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


view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: How to just get the last in a recursive query
  In-Reply-To: <CA+i5Jwbh6Yy-zW3AX3WLCUJANky9w8HtVo99NPxMAc9APY0zhw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox