Forum OpenACS Q&A: Documentation on Postresql driver?

Is there documentation on the postgresql driver for AOLServer? Because
I'm wondering if there are any special calls to ns_db or even a new
library (e.g. ns_ora) which provide additional functionality. Thanks!

-jag

Collapse
Posted by Roberto Mello on
I looked through the source code and found the following ns_pg functions. They are not documented well, and we need to change that. I'll add description to the best of my knowledge here. Please correct/add something I forget here:

  • ns_pg ntuples: number of rows affected by the last statement.
  • ns_pg db: returns name of database.
  • ns_pg host: ditto
  • ns_pg options: ditto
  • ns_pg port: ditto
  • ns_pg error: returns error in last statement.
  • ns_pg status: status of connection

When the driver is compiled with the FOR_ACS_USE flag, you also have these:

  • ns_pg blob_write
  • ns_pg blob_dml_file
  • ns_pg blob_select_file
  • ns_pg blob_put
Collapse
Posted by Joshua Ginsberg on
Thanks for the reponse... I wish I had gotten it but I mistyped my email... silly me...

Anyways, I'm trying to use ns_pg ntuples and whenever I do, Aolserver crashes and respawns under inittab... my logs don't indicate any sort of error... I've got verbose output on... it registers that the initial query takes place, but as soon as ns_pg ntuples $db is called, Aolserver crashes...

I'm using AS 3.3.1+ad13, pg7.1.2, linux 2.4.5, gcc 2.96-85

Thanks!

-jag

Collapse
Posted by Yon Derek on
Can you post (or send me directly) the whole TCL file, or even best, a smallest possible tcl file that always crashes your server?

I'll take a look and see if I can figure it out.

Collapse
Posted by Joshua Ginsberg on
I think this is the same law that applies to car repair... you find a problem, complain about the problem, but when somebody trying to help you looks under the hood, the problem mysteriously corrects itself...

I just tried to generate the crash again and could not... I'll keep an eye on it and see if it was something particular to what I was doing... Thanks for your help...

-jag