Thread: pg_starttime()
Hi, here is a patch adding the pg_starttime() function. Can you take a look at it? cheers, Matthias ---------------------------------------------------------------------- Matthias Schmidt Viehtriftstr. 49 67346 Speyer GERMANY Tel.: +49 6232 4867 Fax.: +49 6232 640089
Attachment
This has been saved for the 8.1 release: http:/momjian.postgresql.org/cgi-bin/pgpatches2 --------------------------------------------------------------------------- Matthias Schmidt wrote: > Hi, > > here is a patch adding the pg_starttime() function. > Can you take a look at it? > > cheers, > > Matthias > > ---------------------------------------------------------------------- > Matthias Schmidt > Viehtriftstr. 49 > > 67346 Speyer > GERMANY > > Tel.: +49 6232 4867 > Fax.: +49 6232 640089 > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Do we want to make this superuser-only? 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 reviews and approves it. --------------------------------------------------------------------------- Matthias Schmidt wrote: > Hi, > > here is a patch adding the pg_starttime() function. > Can you take a look at it? > > cheers, > > Matthias > > ---------------------------------------------------------------------- > Matthias Schmidt > Viehtriftstr. 49 > > 67346 Speyer > GERMANY > > Tel.: +49 6232 4867 > Fax.: +49 6232 640089 > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Bruce Momjian wrote: > Do we want to make this superuser-only? Yes, random seeds or so might be deducted from it. I'd also propose to name this function pg_postmaster_starttime() to clarify its purpose. There's already a function of that name in the (non-contrib) admin package with the very same result while implemented differently. Regards, Andreas
Andreas Pflug wrote: > Bruce Momjian wrote: > > Do we want to make this superuser-only? > > Yes, random seeds or so might be deducted from it. > > I'd also propose to name this function pg_postmaster_starttime() to > clarify its purpose. There's already a function of that name in the > (non-contrib) admin package with the very same result while implemented > differently. Agreed, or pg_server_start_time()? Which is better? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Andreas Pflug wrote: >> I'd also propose to name this function pg_postmaster_starttime() to >> clarify its purpose. > Agreed, or pg_server_start_time()? Which is better? It's not instantly obvious whether "server" means the postmaster or the current backend process, so I'd vote with Andreas on this. But I also like start_time better than starttime ... regards, tom lane
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Andreas Pflug wrote: > >> I'd also propose to name this function pg_postmaster_starttime() to > >> clarify its purpose. > > > Agreed, or pg_server_start_time()? Which is better? > > It's not instantly obvious whether "server" means the postmaster or the > current backend process, so I'd vote with Andreas on this. But I also > like start_time better than starttime ... Yea, I agree on both. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Sorry for the delay - I'm back from vacatioin. To be honest - I'm fine with any name ... cheers, Matthias Am 06.06.2005 um 18:44 schrieb Bruce Momjian: > Tom Lane wrote: >> Bruce Momjian <pgman@candle.pha.pa.us> writes: >>> Andreas Pflug wrote: >>>> I'd also propose to name this function pg_postmaster_starttime() to >>>> clarify its purpose. >> >>> Agreed, or pg_server_start_time()? Which is better? >> >> It's not instantly obvious whether "server" means the postmaster or >> the >> current backend process, so I'd vote with Andreas on this. But I also >> like start_time better than starttime ... > > Yea, I agree on both. > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, Pennsylvania > 19073 > > ---------------------------------------------------------------------- Matthias Schmidt Viehtriftstr. 49 67346 Speyer GERMANY Tel.: +49 6232 4867 Fax.: +49 6232 640089