James Robinson <jlrobins(at)socialserve(dot)com> writes:
> Given a reference to id=3, would a recursive query be the trick to
> unrolling the list to discover id=1 as the head using a SQL one-liner?
I think you could do it, but don't have the syntax in my head.
> would any potential recursive query implementation be
> noticably more efficient that a straightforward implementation in
> plpgsql
Most likely not ...
regards, tom lane