Re: Creating a Pseudocolumn

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Creating a Pseudocolumn
Date: 2006-05-16 10:00:05
Message-ID: 20060516100005.GB976@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-05-16 10:10:46 Re: Wrong plan for simple join with index on FK
Previous Message Pavel Stehule 2006-05-16 09:52:05 Wrong plan for simple join with index on FK