Re: [GENERAL] determine client os

2011-06-14 Thread Sim Zacks
On 06/14/2011 08:19 AM, Tom Lane wrote: Sim Zackss...@compulab.co.il writes: All the suggestions given are for the server OS :-( My purpose is to be able to return a correct file path to the client without it specifying the OS. File path? Seems to me that even if you knew the client OS,

Re: [GENERAL] determine client os

2011-06-14 Thread Alban Hertroys
On 14 Jun 2011, at 8:35, Sim Zacks wrote: It is much simpler then that. My data includes file references. One table has the filename with a path placeholder and another table contains the windows and linux versions of the full path. This is for an intranet and we _always_ have the same

Re: [GENERAL] determine client os

2011-06-14 Thread Craig Ringer
On 14/06/11 14:35, Sim Zacks wrote: It is much simpler then that. My data includes file references. One table has the filename with a path placeholder and another table contains the windows and linux versions of the full path. This is for an intranet and we _always_ have the same drive

Re: [GENERAL] determine client os

2011-06-14 Thread Karsten Hilbert
On Tue, Jun 14, 2011 at 09:35:52AM +0300, Sim Zacks wrote: Sim Zackss...@compulab.co.il writes: All the suggestions given are for the server OS :-( My purpose is to be able to return a correct file path to the client without it specifying the OS. File path? Seems to me that even if you

Re: [GENERAL] determine client os

2011-06-14 Thread Sim Zacks
On 06/14/2011 10:29 AM, Craig Ringer wrote: On 14/06/11 14:35, Sim Zacks wrote: It is much simpler then that. My data includes file references. One table has the filename with a path placeholder and another table contains the windows and linux versions of the full path. This is for an

Re: [GENERAL] determine client os

2011-06-14 Thread Craig Ringer
On 06/14/2011 05:54 PM, Sim Zacks wrote: I have a system settings table which defines mount points. I have a directories table which defines the relative path (from the mount point) for each type of document. OK, so your clients already have all the information they need to assemble the

[GENERAL] determine client os

2011-06-13 Thread Sim Zacks
I didn't see a function for this, but is there a way in a postgresql query to determine the client OS? Thanks Sim -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] determine client os

2011-06-13 Thread Pavel Stehule
Hello There is no special function. you can parse some info from version() function. Regards Pavel Stehule 2011/6/13 Sim Zacks s...@compulab.co.il: I didn't see a function for this, but is there a way in a postgresql query to determine the client OS? Thanks Sim -- Sent via

Re: [GENERAL] determine client os

2011-06-13 Thread Craig Ringer
On 06/13/2011 08:21 PM, Pavel Stehule wrote: Hello There is no special function. you can parse some info from version() function. 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

Re: [GENERAL] determine client os

2011-06-13 Thread Greg Sabino Mullane
-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

Re: [GENERAL] determine client os

2011-06-13 Thread hubert depesz lubaczewski
On Mon, Jun 13, 2011 at 12:31:57PM -, 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

Re: [GENERAL] determine client os

2011-06-13 Thread Craig Ringer
On 06/13/2011 08:35 PM, hubert depesz lubaczewski wrote: Please note that it will return os for *server*, and not *client*. Argh, thankyou. I misread the question. Please disregard my suggestion. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] determine client os

2011-06-13 Thread Sim Zacks
All the suggestions given are for the server OS :-( My purpose is to be able to return a correct file path to the client without it specifying the OS. Thanks Sim On 06/13/2011 05:38 PM, Craig Ringer wrote: On 06/13/2011 08:35 PM, hubert depesz lubaczewski wrote: Please note that it

Re: [GENERAL] determine client os

2011-06-13 Thread Tom Lane
Sim Zacks s...@compulab.co.il writes: All the suggestions given are for the server OS :-( My purpose is to be able to return a correct file path to the client without it specifying the OS. File path? Seems to me that even if you knew the client OS, that'd provide next to no information about

Re: [GENERAL] determine client os

2011-06-13 Thread Greg Smith
On 06/13/2011 07:04 AM, Sim Zacks wrote: I didn't see a function for this, but is there a way in a postgresql query to determine the client OS? A PostgreSQL client application is something that speaks a correct protocol to the server. The server has no concept of what the client is other