Re: Custom datestyle for timestamps

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Custom datestyle for timestamps
Date: 2009-03-06 10:32:11
Message-ID: 0f437554-7284-4180-95f5-c76f24eea853@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut wrote:

> On Thursday 05 March 2009 00:19:02 Daniel Verite wrote:
> > SET DATESTYLE takes predefined keywords such as ISO or US as
arguments,
> > but I can't find a way to specify a custom format string for
> > timestamps.
>
> There is no support for that.
>
> > What I'd like to find is an equivalent to Oracle's
> > ALTER SESSION SET nls_date_format='DD/MM/YYYY HH24' for example,
> > where the format follows the sames rules than to_char and to_date.
> > This sets an implicit format for every subsequent text<->date
> > conversion.
>
> ... or that.

I think it would valuable to have at least a default format that
doesn't include the sub-second precision, since it typically adds 7
characters that enlarge output columns in a way that is generally
useless to the human eyes. Do other users agree with that?

Best regards,
--
Daniel

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aaron 2009-03-06 13:47:35 iSCSI SAN Suggestions
Previous Message Richard Huxton 2009-03-06 10:13:25 Re: Posts not showing