Forum OpenACS Q&A: Re: Content repository with ACS5.0.2

Collapse
Posted by Don Baccus on
In the Oracle version we use CONNECT BY to implement hierarchical queries.

PostgreSQL does not have an equivalent feature, so we added tree_sortkeys to acs_objects and certain other object types.  These sortkeys allow us to construct hierarchical queries in PostgreSQL.

You should study some of the hierarchical queries that exist in the Oracle version to figure out how to write your query correctly.  Be warned that CONNECT BY in 8i has some annoying and confusing restrictions (some of which have been removed in 9i).

Collapse
Posted by Jade Rubick on
Don, is the context_id used to build the hierarchy in Oracle?

I'll put a note in the documentation (the advanced tutorial) that tree_sortkey is only in the Postgres version of acs_objects.

If you clarify this, I'll put it in the docs.