Re: getpid() function

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: getpid() function
Date: 2002-08-02 20:09:55
Message-ID: 200208022009.g72K9tD20076@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Thomas Lockhart wrote:
> ...
> > Perhaps a more relevant question is why are we cluttering the namespace
> > with any such function at all? What's the use case for it? We've
> > gotten along fine without one so far, and I don't really think that we
> > *ought* to be exposing random bits of internal implementation details
> > at the SQL level.
>
> Actually, I was wondering the same thing, maybe for a different reason.
> Exposing the backend internals could have security implications (though
> don't make me concoct a scenario to prove it ;)
>
> Although it might have some usefulness for debugging, I think it should
> not be an "installed by default" feature, so istm would be a great
> candidate for a contrib/ function or library. If someone needs it, it is
> almost immediately available.

It was requested because it is exposed in libpq and people need it to
generate unique names and stuff like that from within psql and
functions. Seems like a valid use for the pid.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-08-02 20:25:06 Re: getpid() function
Previous Message Doug McNaught 2002-08-02 20:06:44 Re: How i can empty the buffers of a db

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-02 20:25:06 Re: getpid() function
Previous Message Greg Copeland 2002-08-02 20:07:04 Re: WAL file location