Re: [HACKERS] uptime() for postmaster

2005-01-03 Thread Matthias Schmidt
Hi Tom, Am 31.12.2004 um 20:18 schrieb Tom Lane: Matthias Schmidt [EMAIL PROTECTED] writes: a) is the name uptime() OK? Probably should use pg_uptime(), or something else starting with pg_. What about 'pg_starttime()' since it is not a period but a point-in-time? b) is the return-type

Re: [HACKERS] uptime() for postmaster

2005-01-03 Thread Gaetano Mendola
Matthias Schmidt wrote: Hi Tom, Am 31.12.2004 um 20:18 schrieb Tom Lane: Matthias Schmidt [EMAIL PROTECTED] writes: a) is the name uptime() OK? Probably should use pg_uptime(), or something else starting with pg_. What about 'pg_starttime()' since it is not a period but a point-in-time? b) is

Re: [HACKERS] uptime() for postmaster

2005-01-03 Thread Greg Stark
Gaetano Mendola [EMAIL PROTECTED] writes: Well, the unix guys have the abit to have the uptime as an interval, I'm inclined to have boths: pg_uptime ( interval ) and pg_starttime ( timestamptz ) Well for the OS these are not redundant values. The clock could have been adjusted at any time.

[HACKERS] uptime() for postmaster

2004-12-31 Thread Matthias Schmidt
Hi Bruce, I started to work on the uptime() for the postmaster yesterday. A couple of questions: a) is the name uptime() OK? b) is the return-type 'Interval' OK? c) does it make sense (... fit in the scheme?) to place the code here: src/backend/utils/misc/uptime.c d) Can I piggy-back on

Re: [HACKERS] uptime() for postmaster

2004-12-31 Thread Tom Lane
Matthias Schmidt [EMAIL PROTECTED] writes: a) is the name uptime() OK? Probably should use pg_uptime(), or something else starting with pg_. b) is the return-type 'Interval' OK? It might be better to return the actual postmaster start time (as timestamptz) and let the user do whatever