pg_starttime()

Started by Matthias Schmidtover 21 years ago8 messagespatches
Jump to latest
#1Matthias Schmidt
schmidtm@mock-software.de

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

Attachments:

starttime.patchapplication/octet-stream; name=starttime.patch; x-unix-mode=0644Download+30-0
#2Bruce Momjian
bruce@momjian.us
In reply to: Matthias Schmidt (#1)
Re: pg_starttime()

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
#3Bruce Momjian
bruce@momjian.us
In reply to: Matthias Schmidt (#1)
Re: pg_starttime()

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
#4Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Bruce Momjian (#3)
Re: pg_starttime()

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

#5Bruce Momjian
bruce@momjian.us
In reply to: Andreas Pflug (#4)
Re: pg_starttime()

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
#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#5)
Re: pg_starttime()

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

#7Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#6)
Re: pg_starttime()

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
#8Matthias Schmidt
schmidtm@mock-software.de
In reply to: Bruce Momjian (#7)
Re: pg_starttime()

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