[OGo-Users] Postgre fatal error after new install on Suse 10.2

Adam Tauno Williams users@opengroupware.org
Mon, 29 Jan 2007 08:32:48 -0500


> > > Hey at least you can reproduce it.  Something broken in Suse 10.2  
> > > version of
> > > PostgreSQL I assume.

I was working previously;  I've been doing all my development on
openSUSE 10.2

> > Hm, no, I don't think anything is broken in _PostgreSQL_. Our usage  
> > of the PG API might be incorrect (why is it treated as a string,  
> > probably there is a better way?).
> > Anyways, probably the locale changed and the datetime format changed  
> > in the same run, leading to the issue. I _think_ the datetime format  
> > can be set using some environment variable, but I'm not perfectly sure.
> Yes, there are both the PGDATESTYLE and PGTZ environment variables;  as
> well as the PGCLIENTENCODING which I suppose could be involved.
> There are also equivalent SET command; "SET datestyle TO ..." and "SET
> timezone TO ...".
> I think what OGo/SOPE wants is:
> SET datestyle TO ISO;  // YYYY-MM-DD HH:MM:SS
> SET timezone To 'GMT'; // Set the DBs timezone to GMT
> Perhaps it would be a good idea to execute these two commands when
> SOPE/OGo sets up its database connection,  this might work around if the
> systems defaults are funky.
> In the short term I'll try making sure these are set in OGo's
> environment and see what happens.

Nope, no effect what-so-ever.

I've tried adding:
export PGDATESTYLE=ISO
export PGTZ=GMT

to both the PostgreSQL and OGo WebUI startup script;  no change at all.

Application Server caught exception:

  session: 781078100145BDE84C
  element: 
  context: <0x0x86f791c[WOContext]: 00145bde84c086f791c app=ogo-webui-1.1 sn=781078100145BDE84C eid= rqeid=>
  request: <WORequest[0x0x86f3f24]: method=GET uri=/OpenGroupware app=OpenGroupware rqKey= rqPath=>

  class:   PostgreSQL72Exception
  name:    PostgreSQL72FatalError
  reason:  fatal pgsql error (channel=<0x0x88e0214[PostgreSQL72Channel]: connection=<0x0x88e0414[PGConnection]:  connection=0x0x88e0c88>>): ERROR:  invalid input syntax for type timestamp with time zone: "%Y-%m-%d %H:%M:%S%z"

  info: