Forum OpenACS Q&A: to_date and postgres-pgtcl

Posted by David Richards on
I'm stuck with the to_date function in Postgres.  I compiled Postgres
7.0 with the --with-tcl option.  Then, when I ran load-data-model.sql,
I uncommented i postgres-pgtcl.  Had I been thinking, I probably
would've left it commented out.  (I guess it's only required for
6.5.)  Now, when the tcl calls to_date, postgres burps.  My question
is what do I do now?  I don't want to lose my database, I've already
got some valuable data in it.  Can I manually make corrections?
Posted by Roberto Mello on
postgres-pgtcl is only necessary for PG 6.5 (as noted in load-data-model.sql). Dump your database data, destroy it and reload load-data-model.sql from scratch and then read your dump back in.

The problem with that is that your sequences will be screwed up. You'll have to drop a bunch of them and recreate them according to your dump file (that has the right values). I don't know an easy way around that. Anyone ?

Posted by Don Baccus on
Can't you just drop all the functions defined in postgres-pgtcl?  Are there any tables/views/functions that call them directly?  A few moments with grep in /doc/sql should answer that question.  If not, dropping them should be fine and the queries from the ACS Tcl scripts will call the built-in function, not the pgtcl one.