Re: time format

From: ivan <iv(at)psycho(dot)pl>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Kurt Roeckx <Q(at)ping(dot)be>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: time format
Date: 2004-01-05 20:42:31
Message-ID: Pine.LNX.4.56.0401052130480.5956@rex.anfa.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


there can be same problems with back convering, but its would be only
when select is going out, to cstring form, and all its depend on user,
but this is ok :)

On Mon, 5 Jan 2004, Karel Zak wrote:

> On Sat, Jan 03, 2004 at 10:20:57PM +0100, ivan wrote:
> >
> > ok, bat each time where i want to do select .. a nie tu use to_char,
> > but it should be in function timestamp_out to convert time to string
> > it would be easer and faster.
>
> I don't think it will too much faster :-)
>
> BTW, for example the Oracle allows to define default date/time output
> format by same way as for to_char().
>
> TODO (?):
>
> SET TIMESTAMP_FORMAT = 'MM/DD/YYYY HH24:MI:SS';
>
> SELECT 'now'::timestamp;
> timestamp
> ----------------------------
> 01/05/2004 10:25:01
>
>
> But it require check (be sure) that defined format is possible without
> problems convert back from string to timestamp. For this Thomas didn't
> like this idea.
>
> I think dynamic timestamp format is final solution of all problems with
> PostgreSQL date/time formats.
>
> Comments?
>
> Karel
>
> >
> > On Sat, 3 Jan 2004, Kurt Roeckx wrote:
> >
> > > On Sat, Jan 03, 2004 at 09:25:14AM +0100, ivan wrote:
> > > >
> > > > but what about default style ?
> > > > first time when i saw DateStyle i thought that i can use it like C/C++
> > > > function strftime. I would be not bad idea to have custom data style :)
> > >
> > > Use to_char() function to put it in any format you want.
> > >
> > >
> > > Kurt
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 8: explain analyze is your friend
> > >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: the planner will ignore your desire to choose an index scan if your
> > joining column's datatypes do not match
>
> --
> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
> http://home.zf.jcu.cz/~zakkr/
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2004-01-05 20:48:26 Re: documentation bug?
Previous Message Rajesh Kumar Mallah 2004-01-05 19:35:52 Re: Announce: Search PostgreSQL related resources