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

Timestamp data type problems

From: Olivier PRENANT <ohp(at)pyrenet(dot)fr>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Timestamp data type problems
Date: 2000-05-29 12:27:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Please help!

I'm having troubles with the timestamp type:
here's a psql output :

Script started on Mon May 29 13:32:08 2000
~ 13:32:08: psql pyrenet
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

pyrenet=# select 'today'::date;
(1 row)

pyrenet=# select 'today'::timestamp
 Mon 29 May 00:00:00 2000 MET DST(ÎäÍ^A
(1 row)

script done on Mon May 29 13:44:30 2000

As you can see, there's no \0 after TZ.

Checking to code led me to EncodeTimeSpan that does strcpy and strncpy and
never puts a null character.

Could this be a bug?

That's breaking all my scripts because if I add a timespan value to it,
then the backend complains about bad formated external timestamp.

Please help!

This is V7.0 on Unixware 7.0.1 compiled with cc.

Olivier PRENANT         	Tel:	+33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
FRANCE                      Email: ohp(at)pyrenet(dot)fr
Make your life a dream, make your dream a reality. (St Exupery)


pgsql-hackers by date

Next:From: Jeff MacDonaldDate: 2000-05-29 14:32:33
Subject: Re: The New Slashdot Setup (includes MySql server)
Previous:From: Denis PerchineDate: 2000-05-29 10:56:13
Subject: pg_* files are too large for empty database.

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