Re: time type strange behaviour - Mailing list pgsql-general

From Tom Lane
Subject Re: time type strange behaviour
Date
Msg-id 25035.1160495910@sss.pgh.pa.us
Whole thread Raw
In response to time type strange behaviour  (garry saddington <garry@schoolteachers.co.uk>)
Responses Re: time type strange behaviour  (garry saddington <garry@schoolteachers.co.uk>)
List pgsql-general
garry saddington <garry@schoolteachers.co.uk> writes:
> I have the following table def.
> CREATE TABLE periods
> (
>   periodid serial NOT NULL,
>   periodnumber integer NOT NULL,
>   periodstart time with time zone,
>   periodend time with time zone,
>   PRIMARY KEY (periodid)
> )

> This definition does not insert time zone. If I use without time zone
> then the time zone is inserted.
> If I input a time like: 01:05 AM then on select I get something like:
> 1970/01/01 01:05:00:00.

Better look again --- if you get that output, the column is most
certainly not a time column --- it must be timestamp.  Perhaps you
got confused about which table is which?

            regards, tom lane

pgsql-general by date:

Previous
From: garry saddington
Date:
Subject: time type strange behaviour
Next
From: "Joshua D. Drake"
Date:
Subject: Re: [PERFORM] Postgre 8.0 Installation - Issues