Re: determine client os - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: determine client os
Date
Msg-id 20110613123517.GA6185@depesz.com
Whole thread Raw
In response to Re: determine client os  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: determine client os
List 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 by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: determine client os
Next
From: Merlin Moncure
Date:
Subject: Re: Tweaking bytea / large object block sizes?