>
> At a short glance, I'd say that they are pretty much the same.
> The filter and the top-1-sort will both require a single scan through
> the result set and one operation per row found.
> And the recursive queries are pretty similar, right?
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www
Hi,
I've been playing around with hierarchical queries a bit and one thing
I wanted to do is build a query that gives the ultimate parent for a
given child.
The two queries below seem to be a good a shortlist as any.
I'm no query-plan guru, but these seem to be largely identical aside
from one
On 14 April 2018 at 16:38, Tom Lane wrote:
> Bob Jones writes:
>> My apologies if I'm being incredibly stupid here, but I've reviewed
>> what the docs have to say about naming portals and I still can't see
>> where I'm going wrong here ?
>
> I t
Hello,
My apologies if I'm being incredibly stupid here, but I've reviewed
what the docs have to say about naming portals and I still can't see
where I'm going wrong here ?
CREATE FUNCTION blah(v_id text,v_cursor refcursor) RETURNS refcursor
AS
$BODY$
BEGIN
OPEN v_cursor FOR SELECT * FROM blah w
Hello,
Whilst researching current thinking on hierarchical queries in
Postgres, I stumbled accross this excellent blog post:
https://illuminatedcomputing.com/posts/2014/09/postgres-cte-for-threaded-comments/
But try as I might, my SQL-foo is not up to scratch to adapt it to my
needs, I keep on l