[ic] So does anyone actually use Interchange with Postgres?

Janine Sisk janine at furfly.net
Wed Jul 28 13:44:18 EDT 2004

On Jul 28, 2004, at 9:49 AM, Jon Jensen wrote:

> Yes, many of us use PostgreSQL with Interchange. I don't remember your
> question because I was busy at the time and didn't have time to read 
> it in
> depth ... That's the way it is on a mailing list sometimes. Perhaps you
> could ask again, including whatever you've learned since ...

Hmm... I resent my original message but it's not showing up in the list 
archive;  I suspect the list software saw it was a dup and filtered it 
out.  So here's the relevant bits.  The error is happening when trying 
to mark orders as shipped.

Well, I've narrowed it down a bit.  The error log shows this: EpZsCaBB: - [27/July/2004:16:14:21 -0400] shop 
/cgi-bin/shop/process Vend::Table::DBI - Length Exception! - Data 
length: 25 Field length: 8 EpZsCaBB: - [27/July/2004:16:14:21 -0400] shop 
/cgi-bin/shop/process Vend::Table::DBI - Length Exception - Table: 
orderline, Field: update_date. Action to take: truncate_log EpZsCaBB: - [27/July/2004:16:14:21 -0400] shop 
/cgi-bin/shop/process Runtime error: DBD::Pg::st execute failed: ERROR: 
  Bad timestamp external representation '2004-07-' at 
/usr/lib/interchange/lib/Vend/Table/DBI.pm line 1626.

So it gets a very long date string from somewhere, truncates it to the 
expected length, and then gets an error inserting it because it's no 
longer a valid date.

The default date format in Postgres is very long, and that's probably 
the culprit:

shop=> select now();
  2004-07-27 16:22:30.469621-04
(1 row)

MySQL, according to a book I happened to have handy, has a default 
format of YYYYMMDDHHMMSS, which would truncate into 8 characters that 
actually work as  a date.

I can't find any way of telling Postgres to use that date format.  Does 
this mean Interchange isn't really compatible with Postgres after all, 
or am I missing something here?



More information about the interchange-users mailing list