| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | felipe(dot)alvarez(at)qlsoft(dot)cl |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: date style bug |
| Date: | 2001-07-23 14:25:24 |
| Message-ID: | 14908.995898324@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Felipe Alvarez Harnecker <felipe(at)qlsoft(dot)cl> writes:
> obelix3=> set datestyle=postgres,euro;
> SET VARIABLE
> obelix3=> select * from orden_visita where fecha_emision <= 'today'::date;
> ERROR: Bad date external representation '07-17-2001'
Since '07-17-2001' is *not* a valid date in Euro convention
(dd-mm-yyyy), I don't see any bug here.
I take it fecha_emision is a text or varchar field that your query is
casting to date on-the-fly. Perhaps you'd be better advised to use
datatype date (or timestamp) for the field in the first place.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-07-23 15:00:02 | Re: create view bug |
| Previous Message | Jefim Matskin | 2001-07-23 14:13:09 | create view bug |