pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp)
2+ messages / 2 participants
[nested] [flat]

* missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp)
@ 2000-09-23 15:45 Louis-David Mitterrand <cunctator@apartia.ch>
  2000-09-23 16:46 ` Re: missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp) Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Louis-David Mitterrand @ 2000-09-23 15:45 UTC (permalink / raw)
  To: pgsql-sql

On Thu, Sep 21, 2000 at 01:25:05PM -0700, Jie Liang wrote:
> Hi, there,
> 
> urldb=# create table foo(sec int4);
> CREATE
> urldb=# insert into foo values(54321);
> INSERT 382942319 1
> urldb=# select interval(reltime (sec||'secs')) from foo;
>  interval
> ----------
>  15:05:21
> (1 row)

By the way, is it normal that the "day" word doesn't appear in the interval?

auction=# select interval(now()::abstime::int4);
          interval          
----------------------------
 30 years 9 mons 3 15:42:09
(1 row)

-- 
Louis-David Mitterrand - ldm@apartia.org - http://www.apartia.org

"Perl Guy and Executive Glue Sniffer"
										(stolen from Aaron Sherman's .sig)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp)
  2000-09-23 15:45 missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp) Louis-David Mitterrand <cunctator@apartia.ch>
@ 2000-09-23 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2000-09-23 16:46 UTC (permalink / raw)
  To: ldm@apartia.ch; +Cc: Thomas Lockhart <lockhart@alumni.caltech.edu>; pgsql-sql

Louis-David Mitterrand <cunctator@apartia.ch> writes:
> By the way, is it normal that the "day" word doesn't appear in the interval?

> auction=# select interval(now()::abstime::int4);
>           interval          
> ----------------------------
>  30 years 9 mons 3 15:42:09
> (1 row)

Looks like a bug to me ... Thomas, do you agree?

Curiously, it appears that the interval input converter will accept this
with or without the 'days' keyword included.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-09-23 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-23 15:45 missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp) Louis-David Mitterrand <cunctator@apartia.ch>
2000-09-23 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>

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