From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Wright, George" <George(dot)Wright(at)infimatic(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: function exception |
Date: | 2008-05-06 14:45:11 |
Message-ID: | 13931.1210085111@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
"Wright, George" <George(dot)Wright(at)infimatic(dot)com> writes:
> I would expect it to return FALSE but it returns:
> ERROR: date/time field value out of range: "2008-05-06 00:00:95"
> Is there either a specific error code to use or is there a generic catch
> all code? I didn't see anything better listed at
> http://www.postgresql.org/docs/8.0/static/errcodes-appendix.html
Well, the way to debug this sort of thing is to look at the error code
number. In psql you do it like this:
regression=# \set VERBOSITY verbose
regression=# select '2008-05-06 00:00:95'::timestamptz;
ERROR: 22008: date/time field value out of range: "2008-05-06 00:00:95"
LOCATION: DateTimeParseError, datetime.c:3112
and then a search in the appendix for 22008 finds
22008 DATETIME FIELD OVERFLOW
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Wright, George | 2008-05-06 14:52:14 | Re: function exception |
Previous Message | Wright, George | 2008-05-06 14:23:55 | function exception |