> ... When the datereceived parameter was defined
> as type Date, it was actually arriving at the procedure as "11-08-2003" and
> "25-08-2003" in spite of showing up as indicated below.  When I redefined
> the datereceived parameter as type OdbcDate, it arrived correctly at the
> procedure as "2003-08-11" and "2003-08-25".

Yeah.  The first two formats are ambiguous, in Postgres' mind anyway.
With the US datestyle setting, it will first attempt to parse as mm-dd-yyyy
and if that fails try dd-mm-yyyy.  So you'd need to change the datestyle
to Euro to get dd-mm-yyyy input to be parsed reliably.

As of 7.4 this is being tightened up, btw --- it'll be mm-dd-yyyy or error.

But AFAICS this has nothing to do with a default now() insertion,
because that value is never converted to a string before it gets into
the stored column.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to