Обсуждение: Bug #885: Trouble with timestamps after vacuuming

Поиск
Список
Период
Сортировка

Bug #885: Trouble with timestamps after vacuuming

От
pgsql-bugs@postgresql.org
Дата:
Marcelo (marsosa@tangobroker.com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Trouble with timestamps after vacuuming

Long Description
I had a table in which one field is a timestamp:
CREATE TABLE blabla (
[...]
        "update_time" timestamp with time zone
[...]
)

I did a pg_dump of the table and then i wanted to re create it and it gives me the following error:

Query failed: ERROR:  Bad timestamp external representation '06/05/2002 11:42:10 ART'

I had to take out the " ART" part (sed s/" ART"/""/ did the trick)
But if i do a pg_dump again, the same happens, so i can't have a backup ready-to-go.
Is it a bug? a feature? or some setting somewhere?

PostgreSQL 7.2.3 on i586-pc-linux-gnu, compiled by GCC 2.96 (redhat 7.2, postgres installed from sources)

Thanks,
Marcelo.

Sample Code
INSERT INTO "indices" ("ind_nombre","cierre_ant","precio_ult","update_time") VALUES
('MERVAL','525.0900','524.9500','02/01/200311:08:02 ART'); 


No file was uploaded with this report

Re: Bug #885: Trouble with timestamps after vacuuming

От
Tom Lane
Дата:
pgsql-bugs@postgresql.org writes:
> Query failed: ERROR:  Bad timestamp external representation '06/05/2002 11:42:10 ART'

> PostgreSQL 7.2.3 on i586-pc-linux-gnu, compiled by GCC 2.96 (redhat 7.2, postgres installed from sources)

Timezone 'ART' is in the list of timezones known to Postgres, but the
table order is messed up --- it's searched by a binary search which can
fail to find entries if the alphabetical ordering isn't perfect.
You can fix it yourself if you need to --- see datetktbl[] in
src/backend/utils/adt/datetime.c.

This was only recently noticed in 7.3, and I had thought that it was a
newly introduced bug, but now I see the problem exists in 7.2.* as well.
Will patch it in 7.2.4, due out next week.

            regards, tom lane