Win32 version question

Started by Christopher Kings-Lynneover 21 years ago6 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

In phpPgAdmin, I need to know if the backend supports tablespaces or
not. What is the most reliable way of detecting that the backend is the
win32 native version and hence does not support tablespaces? Version
string info?

Or alternatively, what is the most direct way of detecting its presence
or absence, regardless of backend OS?

Chris

#2Merlin Moncure
merlin.moncure@rcsonline.com
In reply to: Christopher Kings-Lynne (#1)
Re: Win32 version question

In phpPgAdmin, I need to know if the backend supports tablespaces or
not. What is the most reliable way of detecting that the backend is

the

win32 native version and hence does not support tablespaces? Version
string info?

Or alternatively, what is the most direct way of detecting its

presence

or absence, regardless of backend OS?

Check the uptime...if it's greater than 7 days, it's not win32 :).

Seriously, you can check the version() string. If it's got mingw init,
it's win32 native.

Merlin

------------------------------------------------------------------------
----------------------------
----
PostgreSQL 7.5devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.2.3 mingw special 20030504
-1)

#3Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Merlin Moncure (#2)
Re: Win32 version question

On Wed, Jun 30, 2004 at 11:16:15AM -0400, Merlin Moncure wrote:

In phpPgAdmin, I need to know if the backend supports tablespaces or
not. What is the most reliable way of detecting that the backend is
the win32 native version and hence does not support tablespaces?
Version string info?

Seriously, you can check the version() string. If it's got mingw init,
it's win32 native.

So it can't be compiled by other compiler? Say Digital Mars or some
Microsoft or Borland compiler?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El d�a que dejes de cambiar dejar�s de vivir"

#4Joshua D. Drake
jd@commandprompt.com
In reply to: Alvaro Herrera (#3)
Re: Win32 version question

So it can't be compiled by other compiler? Say Digital Mars or some
Microsoft or Borland compiler?

Nope. It needs the GNU tool set.

-- 
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
#5Robert Treat
xzilla@users.sourceforge.net
In reply to: Merlin Moncure (#2)
Re: Win32 version question

On Wed, 2004-06-30 at 11:16, Merlin Moncure wrote:

In phpPgAdmin, I need to know if the backend supports tablespaces or
not. What is the most reliable way of detecting that the backend is

the

win32 native version and hence does not support tablespaces? Version
string info?

Or alternatively, what is the most direct way of detecting its

presence

or absence, regardless of backend OS?

Check the uptime...if it's greater than 7 days, it's not win32 :).

Seriously, you can check the version() string. If it's got mingw init,
it's win32 native.

Does the win32 build have a pg_tablespace table? are there any rows in
it?

Was thinking the combination of the two queries would be able to
determine table space support in some fashion:

select * from pg_class where relnamespace = (select oid from
pg_namespace where nspname = 'pg_catalog') and relname =
'pg_tablespace';

select count(*) from pg_tablespace ;

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

#6Merlin Moncure
merlin.moncure@rcsonline.com
In reply to: Robert Treat (#5)
Re: Win32 version question

Does the win32 build have a pg_tablespace table? are there any rows in
it?

Was thinking the combination of the two queries would be able to
determine table space support in some fashion:

select * from pg_class where relnamespace = (select oid from
pg_namespace where nspname = 'pg_catalog') and relname =
'pg_tablespace';

select count(*) from pg_tablespace ;

select count(*) from pg_tablespace;
works normally, but you can do something like this:

You can do this:
test=# create tablespace ts location 'c:/temp';
ERROR: tablespaces are not supported on this platform
test=#