Re: getpid() function

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: getpid() function
Дата
Msg-id 200208022009.g72K9tD20076@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: getpid() function  (Thomas Lockhart <lockhart@fourpalms.org>)
Ответы Re: getpid() function
Список 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Copeland
Дата:
Сообщение: Re: WAL file location
Следующее
От: Tom Lane
Дата:
Сообщение: Re: getpid() function