public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rob Sargent <[email protected]>
To: Shaozhong SHI <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: How to just get the last in a recursive query
Date: Mon, 4 Apr 2022 17:24:42 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+i5JwZR_XYcbU_bekoAo1rAE=6+X+je_7+4+repLztLZqxoHg@mail.gmail.com>
References: <CA+i5JwbAz1nO_yVtfBfDeJwk8NmEQ_8bC15cOEMyc_j_Zi70Jg@mail.gmail.com>
<CA+i5Jwbh6Yy-zW3AX3WLCUJANky9w8HtVo99NPxMAc9APY0zhw@mail.gmail.com>
<[email protected]>
<CA+i5JwZR_XYcbU_bekoAo1rAE=6+X+je_7+4+repLztLZqxoHg@mail.gmail.com>
On 4/4/22 17:21, Shaozhong SHI wrote:
> That is not the most efficient in this case.
> How to tell query to deliberately miss out all except the last one is
> of interest.
> Regards, David
>
> On Monday, 4 April 2022, Rob Sargent <[email protected]> wrote:
>
> On 4/4/22 16:14, Shaozhong SHI wrote:
>>
>>
>> ---------- 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
> reverse the order of the last query and set limit 1
>
Don't top post
And your definition of "last" is what, exactly
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], [email protected]
Subject: Re: How to just get the last in a recursive query
In-Reply-To: <[email protected]>
* 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