Re: Creating a Pseudocolumn - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Creating a Pseudocolumn
Date
Msg-id 20060516100005.GB976@svana.org
Whole thread Raw
In response to Re: Creating a Pseudocolumn  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Responses Re: Creating a Pseudocolumn
Re: Creating a Pseudocolumn
List pgsql-hackers
On Tue, May 16, 2006 at 03:18:19PM +0530, Gurjeet Singh wrote:
>    LEVEL might not be a part of the standard, but it is very handy
> when dealing with hierarchical queries.
>
> The chapter 1 (http://www.oreilly.com/catalog/sqlpr/chapter/ch01.pdf)
> of book 'SQL Pocket Guide' elaborates more on it.

Looking at that text, it describes how to generate a LEVEL value using
the WITH RECURSIVE method, it seems to me you could apply the same
method to what you're doing. Just like how on UPDATE and DELETE queries an
invisible "ctid" column is added, LEVEL would be an attribute of the
tuple being passed up.

I'm assuming that what's actually being implemented is the SQL standard
method with the Oracle alternative being another way of specifying the
same thing?

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Wrong plan for simple join with index on FK
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Wrong plan for simple join with index on FK