any built-in function to get time in seconds?

From: zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: any built-in function to get time in seconds?
Date: 2010-04-03 00:41:09
Message-ID: i2p9e434c4d1004021741h8ac7f769t63f94e4f027b26a7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have been using this one liner c function that I call my_now() to
get the number of seconds since some fixed point in the past. I find
it more convenient than built-in now()
and if I want abstime I do abstime(my_now()). Thing is everytime I
do a major version upgrade I had to recompile this and it's a pain in
the neck. I feel there must be something
built-in with pg to get the same thing since I can get abstime from it
like that.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-04-03 00:53:27 Re: any built-in function to get time in seconds?
Previous Message Kevin Kempter 2010-04-02 20:38:16 Re: Table space question