Re: determine client os

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: determine client os
Дата
Msg-id 20110613123517.GA6185@depesz.com
обсуждение
Ответ на Re: determine client os  ("Greg Sabino Mullane" <greg@turnstep.com>)
Ответы Re: determine client os
Список pgsql-general
On Mon, Jun 13, 2011 at 12:31:57PM -0000, Greg Sabino Mullane wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
> > Yep, or you can use a PL/Python, PL/Perl or PL/Java function that makes
> > the appropriate calls in that language. Any of these will probably
> > require the use of the "untrusted" (superuser-only) version.
>
> Nope, you can do this easily in trusted perl:
>
> CREATE OR REPLACE FUNCTION findos()
> RETURNS TEXT
> LANGUAGE plperl
> AS $$
> return $^O;
> $$;
>
> SELECT findos();
>
>  findos
> - --------
>  linux

Please note that it will return os for *server*, and not *client*.

Best regards,

depesz


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