Forum OpenACS Q&A: dates within events module

Collapse
Posted by Terry G. Lorber 2nd on
Here is my error when I try to add an event:


[14/Jun/2000:21:02:42][10278.21509][-conn10-] Error: Ns_PgExec: result 
status: 
7 message: ERROR:  Bad timestamp external representation ''

[14/Jun/2000:21:02:42][10278.21509][-conn10-] Error: nsd.tcl: Database 
operatio
n "1row" failed (exception NSDB, "Query was not a statement returning 
rows.")
Database operation "1row" failed (exception NSDB, "Query was not a 
statement re
turning rows.")
    while executing
"ns_db 1row $db "select case when '$start_time_value'::datetime > 
'$end_time_va
lue'::datetime then 1 else 0 end as problem_1, case when 
'$reg_deadline_ ..."
    invoked from within
"set selection [ns_db 1row $db "select case when 
'$start_time_value'::datetime 
> '$end_time_value'::datetime then 1 else 0 end as problem_1, case when  ..."
    (file "/web/rideside/www/events/admin/event-add-3.tcl" line 51)
    invoked from within
"source $script"
   invoked from within
"if ![file exists $script] {
                ns_returnnotfound $conn
        } else {
                source $script
        }"
    (procedure "ns_sourceproc" line 3)
    invoked from within
"ns_sourceproc cns134 {}"

Do I need to set date formatting within postgres? ...and shouldn't the variables be replaced with the values that generated the errors in the error log?

Thanks.

Collapse
Posted by Terry G. Lorber 2nd on
dang, I just realized I wasn't in the discussion forum I thought I was in...sorry.
Collapse
Posted by Don Baccus on
That's OK - fixing this can be considered adding new functionality :)

Haven't looked into the error, yet, but the Tcl backtrace is a source dump.  This is why the variable, rather than their values, show up.

To see the actual SQL triggering the error with values substituted for  variables, go to your nsd.tcl file and for each pool set "LogSQLErrors" to "on".