Forum OpenACS Q&A: Re: Great tree_sortkey Documentation!

Collapse
Posted by Don Baccus on
Nils, it's been on their todo list for some time ... I think SQL 99 calls them recursive queries or something like that, I'll need to do some research.

Frank, you should just take the Oracle sortkey code for forums, look in forums/sql/oracle/forums-messages-create.sql and forums-tree-create.sql.  Also acs-kernel/sql/oracle/tree-create.sql which creates the underlying package to manipulate keys.

RAW is a form of variable length byte storage that doesn't suffer from collation issues as does VARCHAR when you're using multibyte characters.  They're used much like VARCHARs as you'll see when you inspect the code.

Still, it would be best to use native Oracle CONNECT BY queries I believe as we've done everywhere in the toolkit other than in forums.

Collapse
Posted by Nis Jørgensen on
Dun, Oracles "CONNECT BY" and SQL99 recursive queries are two quite different beasts. I am not sure which one you expect will be included into PG

This quite recent thread discusses the matter

http://archives.postgresql.org/pgsql-hackers/2004-06/msg00969.php

and seems to indicate that

- "CONNECT BY", or at least the currently existing implementation, will not be included any time soon.
- SQL99 recursion had not been implemented then.

/Nis

BTW: How come most mail archives suck so greatly  for  viewing articles by thread (ie the way you want to do it 99% of the time).