回答:
select age(timestamp_A, timestamp_B)
イゴールのコメントへの回答:
select age('2013-02-28 11:01:28'::timestamp, '2011-12-31 11:00'::timestamp);
age
-------------------------------
1 year 1 mon 28 days 00:01:28
Subtract arguments, producing a "symbolic" result that uses years and months
。秒単位の違いはありません。
to get the difference between these timestamps in seconds
ます。そしてit should include hours, minutes etc
、それはのような完全な違いでなければならないことを意味し10:25:30 - 10:15:25 = 605 seconds
ます。私の推測-彼は使用EXTRACT(SECONDS FROM ...)
して得ました10:25:30 - 10:15:25 = 5 seconds