Forum OpenACS Q&A: Calendar question

Collapse
Posted by Andrew Zeon on
cal-item-procs.tcl seems to use plsql (Oracle) to interact with the
db. However, I'm using Postgres so where can I find the equivalent
file that uses pl/pgsql?

Thanks.

Collapse
Posted by Jeff Davis on
the sql you see in the .tcl file is not actually used.  The query
is looked up in one of the cal-item-procs*.xql (the actual query
invoked is either in cal-item-procs-postgresql.xql or, if it is DB
independent, cal-item-procs.xql).  I think yanking the queries out
of the tcl is planned but it has not happened yet (and their existence
is generally a source of great confusion for anyone new to openacs).
Collapse
Posted by James Darwin on
Then how are the queries in the cal-item-procs.tcl ignored? Is the
file used at all?

Thanks.

Collapse
Posted by Jeff Davis on
the tcl code is executed and when database calls are made the query dispatcher substitutes the query from the .xql file and if it does not find anything to substitute it will use the query you see in the .tcl file. This is how it supports multiple databases. Ultimately I think the intent is to remove the query text from the tcl files (although I don't know when that will happen).

You can read more in this thread... https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0005OL&topic_id=12