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  (Craig Ringer <craig@postnewspapers.com.au>)
Список 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 по дате отправления:

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: determine client os
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Tweaking bytea / large object block sizes?