Search Postgresql Archives

Re: determine client os

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux