Home
The Toolkit for Online Communities
16704 Community Members, 0 members online, 2486 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

from news/www/item-create-3.tcl:
set news_id [db_exec_plsql create_news_item {
  begin
  :1 := news.new(
  title           => :publish_title,
  publish_date    => :publish_date_ansi, 
  archive_date    => :archive_date_ansi,
  mime_type       => :mime_type,        
  package_id      => :package_id,       
  approval_user   => :approval_user,     
  approval_date   => :approval_date,      
  approval_ip     => :approval_ip,   
  creation_ip     => :creation_ip,    
  creation_user   => :user_id,     
  is_live_p       => :live_revision_p    
  );
  end;
}]
I replaced the quotation marks with curly braces { }, seems safer to me. Note the :1 = ... at the beginning of the statement.