Re: How to tell what OS PostgreSQL is installed on.

Поиск
Список
Период
Сортировка
От Julio Leyva
Тема Re: How to tell what OS PostgreSQL is installed on.
Дата
Msg-id BLU102-W16DE20EFC3EC64EF65D97CA1CC0@phx.gbl
обсуждение исходный текст
Ответ на How to tell what OS PostgreSQL is installed on.  (Louis Lam <louis.lam@guardium.com>)
Ответы Re: How to tell what OS PostgreSQL is installed on.
Список pgsql-admin
as postgres user

 psql -c "select version()";




From: louis.lam@guardium.com
Date: Thu, 8 Oct 2009 16:58:33 -0400
Subject: [ADMIN] How to tell what OS PostgreSQL is installed on.
To: pgsql-admin@postgresql.org

.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {margin-bottom:.0001pt;font-size:11.0pt;font-family:'Calibri','sans-serif';} .ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {color:blue;text-decoration:underline;} .ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed {color:purple;text-decoration:underline;} .ExternalClass span.ecxEmailStyle17 {font-family:'Calibri','sans-serif';color:windowtext;} .ExternalClass .ecxMsoChpDefault {;} @page Section1 {size:8.5in 11.0in;} .ExternalClass div.ecxSection1 {page:Section1;}

Hi,

 

I have a need to find out what OS PostgreSQL is running under.  I need to be able to query the database or send a command and  figure it out.  I also do not have super user permission to do this.  All I want to know is if the PostgreSQL I am connected to is running from Windows or Non Windows.

 

I could do “Show data_directory” and parse the result, but this require superuser permission.

 

I tried select version() also.  Under Windows OS, I got this:

 

version                                            

 ---------------------------------------------------

 PostgreSQL 8.3.6, compiled by Visual C++ build 1400

 

Does anyone know if Visual C++ is use to only compile PostgreSQL for Windows?  Or can other compiler be use?  If Visual C++ is always use for Windows and Windows only then this is very good information I can use.

 

I know on RedHat, I got this.

 

version                                                                                                

 ------------------------------------------------------------------------------------------------------

 PostgreSQL 8.3.7 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10)

 

And on Solaris I got this.

 

-----------------

 PostgreSQL 8.1.11 on sparc-sun-solaris2.10, compiled by /ws/on10-tools/SUNWspro/SOS8/bin/cc -Xa

(1 row)

 

 

Thank you all in advance for your help.

Louis Lam

 

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Scott Whitney"
Дата:
Сообщение: Re: How to tell what OS PostgreSQL is installed on.
Следующее
От: "Scott Whitney"
Дата:
Сообщение: Re: How to tell what OS PostgreSQL is installed on.