Creating a Pseudocolumn

Поиск
Список
Период
Сортировка
Искать
От
Jonah H. Harris
Тема
Creating a Pseudocolumn
Дата
в 12:03:53
Msg-id
36e682920605150803l4e32ba18i68def954d0f56c27@mail.gmail.com
Список
Дерево обсуждения
Creating a Pseudocolumn "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Creating a Pseudocolumn Martijn van Oosterhout <kleptog@svana.org>
Re: Creating a Pseudocolumn "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Creating a Pseudocolumn Martijn van Oosterhout <kleptog@svana.org>
Re: Creating a Pseudocolumn Tom Lane <tgl@sss.pgh.pa.us>
Re: Creating a Pseudocolumn "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Creating a Pseudocolumn Tom Lane <tgl@sss.pgh.pa.us>
Re: Creating a Pseudocolumn "Gurjeet Singh" <singh.gurjeet@gmail.com>
Re: Creating a Pseudocolumn Martijn van Oosterhout <kleptog@svana.org>
Re: Creating a Pseudocolumn Tom Lane <tgl@sss.pgh.pa.us>
Re: Creating a Pseudocolumn "Jonah H. Harris" <jonah.harris@gmail.com>
Hey everyone,

I'm reworking hierarchical queries and am adding a LEVEL pseudocolumn.As it's a totally calculated attribute, what's the best way to handle
it keeping in mind that LEVEL is only used in a hierarchical query?

Looking at Evgen's patches, if he recognizes a hierarchical query and
finds a LEVEL column in the target list, he creates a FakeVar (similar
to Var) entry for it which is then passed throughout the system and
modified on a per-tuple basis.  While this works, it seems a bit
kludgy and requires a good amount of special-case code.  As such, I
was wondering if you guys have some suggestions on how to use what's
already there to accomplish the same thing.

I couldn't think of any pseudocolumns like this in PostgreSQL, but I
may just be brain-dead again.  As it may be sorta similar, how were we
discussing handling rownum?

-- 
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 2nd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/

В списке pgsql-hackers по дате отправления
От: Hogan, James F. Jr.
Дата:
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Creating a Pseudocolumn
FAQ