Skip site navigation (1) Skip section navigation (2)

Re: date style bug

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: felipe(dot)alvarez(at)qlsoft(dot)cl
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: date style bug
Date: 2001-07-23 15:53:08
Message-ID: 3B5C4864.C8B32A8F@fourpalms.org (view raw or flat)
Thread:
Lists: pgsql-bugs
> I'm having this bug ramdonly, some time with a "vacuum analyze" goes
> away but not always

Likely not related at all.

> obelix3=> set datestyle=postgres,us;
> SET VARIABLE
> obelix3=> select * from orden_visita where fecha_emision <= 'today'::date;
>  numero | corredor | ejecutivo |  remoto   |  cliente  |  retira   | tipo_operac
> ion | fecha_emision
> --------+----------+-----------+-----------+-----------+-----------+------------
> ----+---------------
>     292 | 78626380 |   6607775 | 127.0.0.1 |   8779524 |   8779524 |
> Venta
> QUERY RUNS OK.

What is the value of the fecha_emision column? What is the schema?
> 
> obelix3=> set datestyle=postgres,euro;
> obelix3=> select * from orden_visita where fecha_emision <= 'today'::date;
> ERROR:  Bad date external representation '07-17-2001'

What is the schema? I'll guess that fecha_emision is not actually a date
type (either date or timestamp) but rather a text field. That is the
only way I can think of to provoke an "external representation" error.

More details please.

                      - Thomas

In response to

Responses

pgsql-bugs by date

Next:From: Felipe Alvarez HarneckerDate: 2001-07-23 16:02:57
Subject: Re: date style bug
Previous:From: Tom LaneDate: 2001-07-23 15:18:39
Subject: Re: create view bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group