Re: [PATCHES] uptime function to postmaster

2005-06-15 Thread Bruce Momjian
Neil Conway wrote: > Bruce Momjian wrote: > > We need to preceed our function names with pg_ for cases like this where > > we are supplying pg-specific behavior. > > We do? I'm not sure I can see much of a consistent naming convention for > functions like these: version(), obj_description(), has_

Re: [PATCHES] uptime function to postmaster

2005-06-14 Thread Neil Conway
Bruce Momjian wrote: We need to preceed our function names with pg_ for cases like this where we are supplying pg-specific behavior. We do? I'm not sure I can see much of a consistent naming convention for functions like these: version(), obj_description(), has_xyz_privilege(), format_type(),

Re: [PATCHES] uptime function to postmaster

2005-06-14 Thread Bruce Momjian
Euler Taveira de Oliveira wrote: > Hi Bruce, > > > I think we should return intervals only when we can't return > > meaningful > > timestamp values. I don't have any logic to back up that opinion, > > though. > > > Agreed. > > > > > We need to preceed our function names with pg_ for cases like

Re: [PATCHES] uptime function to postmaster

2005-06-07 Thread Bruce Momjian
I think we agreed on pg_postmaster_start_time() so it is clear it is the postmaster, and not the session. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers

Re: [PATCHES] uptime function to postmaster

2005-06-06 Thread Euler Taveira de Oliveira
Hi Bruce, > I think we should return intervals only when we can't return > meaningful > timestamp values. I don't have any logic to back up that opinion, > though. > Agreed. > > We need to preceed our function names with pg_ for cases like this > where > we are supplying pg-specific behavior. >

Re: [PATCHES] uptime function to postmaster

2005-06-06 Thread Tom Lane
Bruce Momjian writes: > I think we should return intervals only when we can't return meaningful > timestamp values. I don't have any logic to back up that opinion, though. It's easy: a value measured as an interval will be obsolete by the time it's delivered to the client. A start timestamp is a

Re: [PATCHES] uptime function to postmaster

2005-06-06 Thread Bruce Momjian
Euler Taveira de Oliveira wrote: > Hi Bruce, > > > > > I think we are best with just pg_startime. If people want the > > interval > > they can subtract it from CURRENT_TIMESTAMP. I have added Matthias's > > version to the patch queue. > > > > > OK. But IIRC the Matthias implementation doesn't

Re: [PATCHES] uptime function to postmaster

2005-06-06 Thread Euler Taveira de Oliveira
Hi Bruce, > > I think we are best with just pg_startime. If people want the > interval > they can subtract it from CURRENT_TIMESTAMP. I have added Matthias's > version to the patch queue. > > OK. But IIRC the Matthias implementation doesn't work in standalone mode. And talking about the 'inte

Re: [PATCHES] uptime function to postmaster

2005-06-04 Thread Bruce Momjian
I think we are best with just pg_startime. If people want the interval they can subtract it from CURRENT_TIMESTAMP. I have added Matthias's version to the patch queue. --- Euler Taveira de Oliveira wrote: > > Bruce Momjia

Re: [PATCHES] uptime function to postmaster

2005-01-22 Thread Bruce Momjian
This has been saved for the 8.1 release: http://momjian.postgresql.org/cgi-bin/pgpatches2 --- Euler Taveira de Oliveira wrote: > > Bruce Momjian wrote: > > > > This has been saved for the 8.1 release: > > > >

Re: [PATCHES] uptime function to postmaster

2005-01-20 Thread Euler Taveira de Oliveira
Bruce Momjian wrote: > > This has been saved for the 8.1 release: > > http:/momjian.postgresql.org/cgi-bin/pgpatches2 > > --- > Hi, I redo this patch adding the funcionality that Matthias implemented (starttime). B

Re: [PATCHES] uptime function to postmaster

2005-01-03 Thread Bruce Momjian
This has been saved for the 8.1 release: http:/momjian.postgresql.org/cgi-bin/pgpatches2 --- Euler Taveira de Oliveira wrote: > Hi, > > > > > > This patch just implement a function that returns the uptime of > >

Re: [PATCHES] uptime function to postmaster

2004-12-21 Thread Euler Taveira de Oliveira
Hi Alvaro, > > > Patch updated. I improved the function output too. > > Is it really a good idea to have a new file for only one function? > We regularly see complaints about not wanting to do basic source code > cleanup because not wanting to disrupt CVS history ... > I couldn't see a good pla

Re: [PATCHES] uptime function to postmaster

2004-12-21 Thread Alvaro Herrera
On Wed, Dec 22, 2004 at 12:57:34AM -0300, Euler Taveira de Oliveira wrote: Hi, > Patch updated. I improved the function output too. Is it really a good idea to have a new file for only one function? We regularly see complaints about not wanting to do basic source code cleanup because not wanting

Re: [PATCHES] uptime function to postmaster

2004-12-21 Thread Euler Taveira de Oliveira
Hi, > > > This patch just implement a function that returns the uptime of > the > > > postmaster. > > > > Doesn't work in EXEC_BACKEND case. > > > Sorry. I'll fix this. > Patch updated. I improved the function output too. Comments? = Euler Taveira de Oliveira euler[at]yahoo_com_br ___

Re: [PATCHES] uptime function to postmaster

2004-12-19 Thread Euler Taveira de Oliveira
Hi Tom, > > This patch just implement a function that returns the uptime of the > > postmaster. > > Doesn't work in EXEC_BACKEND case. > Sorry. I'll fix this. = Euler Taveira de Oliveira euler[at]yahoo_com_br

Re: [PATCHES] uptime function to postmaster

2004-12-19 Thread Tom Lane
Euler Taveira de Oliveira <[EMAIL PROTECTED]> writes: > This patch just implement a function that returns the uptime of the > postmaster. Doesn't work in EXEC_BACKEND case. regards, tom lane ---(end of broadcast)--- TIP 1: s

[PATCHES] uptime function to postmaster

2004-12-19 Thread Euler Taveira de Oliveira
Hi, This patch just implement a function that returns the uptime of the postmaster. The docs are included too. Another TODO item could be implement a function that returns the startup time. If nobody objects I can do it. Finally, I do not forbid non-superusers to execute it, but we can do this if