Re: interval's and printing...

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: interval's and printing...
Date: 2003-06-24 18:43:24
Message-ID: 200306241843.h5OIhO814410@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


TODO updated:

* Have SELECT '13 minutes'::interval display zero seconds in ISO
datestyle

---------------------------------------------------------------------------

Larry Rosenman wrote:
>
>
> --On Tuesday, June 24, 2003 10:44:25 -0400 Bruce Momjian
> <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
>
> > Larry Rosenman wrote:
> >> >> > * Have SELECT '13 minutes'::interval display zero seconds
> >> >> you might want to clarify the TODO to include in ISO DateStyle.
> >> >>
> >> >> (Per tom's comments).
> >> >
> >> > Can you supply an example/text?
> >> * Have SELECT '13 minutes'::interval display zero seconds when using
> >> DateStyle ISO
> >
> > I am still confused. What does such output look like. Right now I
> > get:
> >
> > test=> SELECT '13 minutes'::interval;
> > interval
> > ----------
> > 00:13
> > (1 row)
> >
> > I assume the idea is to display it as 00:13:00, right?
> Correct, but with Postgres DateStyle or SQL, it does other stuff:
>
> $ psql
> Welcome to psql 7.3.3, 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
>
> ler=# set datestyle='postgres'
> ler-# ;
> SET
> ler=# select '13 minutes'::interval
> ler-# ;
> interval
> -----------
> @ 13 mins
> (1 row)
>
> ler=# set datestyle='sql';
> SET
> ler=# select '13 minutes'::interval;
> interval
> -----------
> @ 13 mins
> (1 row)
>
> ler=# set datestyle='iso,us';
> SET
> ler=# select '13 minutes'::interval;
> interval
> ----------
> 00:13
> (1 row)
>
> ler=#
> >
> > --
> > Bruce Momjian | http://candle.pha.pa.us
> > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> > + If your life is a hard drive, | 13 Roberts Road
> > + Christ can be your backup. | Newtown Square, Pennsylvania
> > 19073
>
>
>
> --
> Larry Rosenman http://www.lerctr.org/~ler
> Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
>
>
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2003-06-24 18:57:59 Re: pg_get_triggerdef in pg_dump
Previous Message Enke, Michael 2003-06-24 18:28:24 Re: [HACKERS] again: Bug #943: Server-Encoding from EUC_TW