Search Postgresql Archives
Re: Forcing INTERVAL days display, even if the interval is less than one day
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Subject
: Re: Forcing INTERVAL days display, even if the interval is less than one day
From
: Greg Sabino Mullane <htamfids@xxxxxxxxx>
Date
: Tue, 7 May 2024 15:47:14 -0400
Cc
: pgsql-general <pgsql-general@xxxxxxxxxxxxxx>
In-reply-to
: <CANzqJaCt-mX2-AzF1j8mRr1xj95_y3JJk=0JHuvn24XDwW3jhg@mail.gmail.com>
References
: <CANzqJaCt-mX2-AzF1j8mRr1xj95_y3JJk=0JHuvn24XDwW3jhg@mail.gmail.com>
Could just use a CASE for that particular case:
CASE WHEN now()-latest_vacuum < '1 day'
THEN '0 days '
ELSE '' END
|| DATE_TRUNC('second', now()-latest_vacuum) AS vacuumed_ago
Cheers,
Greg
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
References
:
Forcing INTERVAL days display, even if the interval is less than one day
From:
Ron Johnson
Prev by Date:
Re: Question regarding how databases support atomicity
Next by Date:
Using GIN Index to see if a nested key exists in JSONB
Previous by thread:
Re: Forcing INTERVAL days display, even if the interval is less than one day
Next by thread:
Using GIN Index to see if a nested key exists in JSONB
Index(es):
Date
Thread
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]