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