Re: determine client os - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: determine client os
Date
Msg-id 84463a9312e08ce673dccca7422b823e@biglumber.com
Whole thread Raw
In response to Re: determine client os  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: determine client os  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
-----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


- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201106130831
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk32AykACgkQvJuQZxSWSsjA4ACfTAqEYCuNEBgbPizAsZ0CJVlI
TmAAnA73swdgs9eP252umOr+LE5SfNuw
=y07O
-----END PGP SIGNATURE-----



pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: determine client os
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: determine client os