Re: connectby(... pos_of_sibling) - Mailing list pgsql-novice

From Joe Conway
Subject Re: connectby(... pos_of_sibling)
Date
Msg-id 3EF4F3D3.6070606@joeconway.com
Whole thread Raw
In response to Re: connectby(... pos_of_sibling)  (Nabil Sayegh <postgresql@e-trolley.de>)
Responses Re: connectby(... pos_of_sibling)
Re: connectby(... pos_of_sibling)
List pgsql-novice
Nabil Sayegh wrote:
> For example (if the pos column is harcoded):
>
> The line:
> --------------------8<------------------------------------------------
>    appendStringInfo(sql, "SELECT %s, %s FROM %s WHERE %s = '%s' AND %s
> IS NOT NULL ORDER BY pos",
> --------------------8<------------------------------------------------
> has to be changed
>
> build_tuplestore_recursively should get a static counter which should be
> incremented and stored with each tuple.
>
> Shouldn't that be all ?

Sounds like all that's needed for your case. But to be complete, in
addition to changing tablefunc.c we'd have to:
1) come up with a new function call signature that makes sense and does
not cause backward compatibility problems for other people
2) make needed changes to tablefunc.sql.in
3) adjust the README.tablefunc appropriately
4) adjust the regression test for new functionality
5) be sure we don't break any of the old cases

If you want to submit a complete patch, it would be gratefully accepted
-- for review at least ;-)

Otherwise, I'll see what I can do between now and the 7.4 feature freeze
(July 1), but as I said, no promises.

Joe


pgsql-novice by date:

Previous
From: Nabil Sayegh
Date:
Subject: Re: connectby(... pos_of_sibling)
Next
From: Nabil Sayegh
Date:
Subject: Re: connectby(... pos_of_sibling)