Re: [GENERAL] Re: Postgresql OO Patch - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [GENERAL] Re: Postgresql OO Patch
Date
Msg-id 392BE859.E21DDA0F@tm.ee
Whole thread Raw
In response to Re: [GENERAL] Re: Postgresql OO Patch  (Marten Feldtmann <marten@feki.toppoint.de>)
List pgsql-hackers
Chris Bitmead wrote:
>
>
> >  - no support for tree structures !
>
> AGAIN AGREE! Original postgres had a syntax "SELECT* from foo" to get a
> transitive closure on a tree! Why this was removed (argh!) I can only
> guess.
>

This is what I got sneaked into TODO (or at least I think it must be it ;):

EXOTIC FEATURES

* Add sql3 recursive unions

From my reading of SQL3 draft a few years ago I concluded that this was wat it
described

Now they seem to have RECURSIVE VIEWs that are used as follows:

CREATE RECURSIVE VIEW APPLICABLE_ROLES ( GRANTEE, ROLE_NAME, IS_GRANTABLE ) AS
    ( ( SELECT GRANTEE, ROLE_NAME, IS_GRANTABLE
          FROM DEFINITION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS
         WHERE GRANTEE IN ( CURRENT_USER, 'PUBLIC' ) )
      UNION
      ( SELECT RAD.GRANTEE, RAD.ROLE_NAME, RAD.IS_GRANTABLE
          FROM DEFINITION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS RAD
          JOIN
               APPLICABLE_ROLES R
               ON
               RAD.GRANTEE = R.ROLE_NAME ) );

The definition of the meaning of RECURSIVE is something I should read in the
morning ;~]

---------------------
Hannu

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: interactive pgsql book
Next
From: Tom Lane
Date:
Subject: Re: AW: More Performance