Re: reltime with NULL fields crashes backend

Thomas Lockhart <lockhart@alumni.caltech.edu>

From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: cit@tag-ltd.spb.ru, pgsql-bugs@postgresql.org
Date: 2001-04-11T13:44:34Z
Lists: pgsql-bugs
> Long Description
> I use expression like int4(reltime(<interval-field>)) to get interval length in seconds. When <interval-field> is NULL backend crashes (psql session):

This is likely fixed in the upcoming 7.1, since NULL handling has been
greatly improved for "by value" types like reltime. However, you *could*
be doing this as

  select date_part('epoch', <interval-field>) ...

hth

                           - Thomas