Forum OpenACS Q&A: Response to Learning ACS through OpenACS?

Collapse
Posted by Todd Gillespie on
Writing as someone who didn't actually write ACS, but had to use/is using the problem sets, I say the differences are small enough to use them, and you will learn a little extra Tcl and SQL (if adventurous, PL/pgSQL) on the translation.  If you want to put together an OpenACS version, hey cool, but keep in mind the effort involved in supporting it as philg updates the lessons, and openACS ports more code...

Anyway, the first SQL divergences you'll run across are:

1) any references to 'dual', namely sysdate.  For sysdate, use the tcl db_sysdate function.

2) sequences read like 'sequence.nextval' in Oracle, and nextval('sequence') in Postgres.  Nothing a regex can't handle.

3) outer joins.  The excellent people here have said it before; a: use unions, and b: god I wish postgres would include outer joins.

4) number is used in Oracle, numeric in postgres (was someone just pissy?)

5) something else bit me on the ass, but I'm on my first coffee for oday...

6) trees; eg. 'connect by'.  I haven't had to use trees yet, so I don't know how to work around the lack in postgres.  Watch this space.

I just started a new contract at a site with Oracle8.1, so I may not be as focused OpenACS for a while, but I'll be back.  Hope some of this helps.  As for documentation, PostgreSQL has a real lack, IMHO.  You should trundle down to the library and grab some Oracle books anyway, if just for concepts.  Good luck!