From: Alex Pilosov <alex@pilosoft.com>
To: Vivek Khera <khera@kcilink.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: Timestamp without time zone
Date: Thu, 14 Jun 2001 11:30:54 -0400 (EDT)
Message-ID: <Pine.BSO.4.10.10106141124160.17529-100000@spider.pilosoft.com> (raw)
In-Reply-To: <x7n17byur3.fsf@onceler.kciLink.com>
You can't.
Docs are slightly misleading, timestamp _has_ timezone, the [with time
zone] syntax is only optional to explicitly specify that TZ is there.
At any case, I have never ran into a problem using timezone, and never
needed to 'strip it'. Since you probably never display bare output of
"select blah" anyway, but format the time in your own unique way, there
you can remove timezone.
Why do you _want_ to remove timezone from values in database? There is
definitely a way to work around whatever problem you are having.
On 14 Jun 2001, Vivek Khera wrote:
> >>>>> "PS" == Pasi Salminen <pasi.salminen@khf.fi> writes:
>
> PS> I am trying to create table with a field which type is timestamp
> PS> and I don't want it to be timestamp with time zone.
>
> This question has been asked at least 4 times since I've been
> following this list, including once by me.
>
> Appaarently, nobody seems to have an answer. The docs imply that type
> timstamp is without timezone, since there is a type "timestamp with
> timezone". If you do a "\d tablename" in psql, it shows "timestamp
> with timezone" on all your fields you declare as timestamp. This
> leads me to believe that they are silently "upgraded" in their type.
>
> I have a subroutine in my apps that strips the timezone before passing
> it along to the users.
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: alex@pilosoft.com, khera@kcilink.com
Subject: Re: Timestamp without time zone
In-Reply-To: <Pine.BSO.4.10.10106141124160.17529-100000@spider.pilosoft.com>
References: <x7n17byur3.fsf@onceler.kciLink.com> <Pine.BSO.4.10.10106141124160.17529-100000@spider.pilosoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox