Home
The Toolkit for Online Communities
17104 Community Members, 0 members online, 2438 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Basic question. How to run a pg stored procedure from tcl : One Message

Forum OpenACS Development: Response to Basic question. How to run a pg stored procedure from tcl

In case you still want to run the query from the tcl file directly instead of the xql file, for example because this is custom code that will certainly never need to be ported to another database, then you would have to enter the double underscore postgres syntax in the inline query, e.g. by doing

db_exec_plsql doc_insert {
  begin
  news__unido_document_object (
  ...
  );
  end;
}
not news.unido_document_object, which is the syntax for oracle. The reason why all inline queries in the toolkit are written in this syntax is because they are simply left in there from before the porting effort and they were originally written for oracle, but the query dispatcher chooses those from the xql file if present.