Обсуждение: Win32 version question

Поиск
Список
Период
Сортировка

Win32 version question

От
Christopher Kings-Lynne
Дата:
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


Re: Win32 version question

От
"Merlin Moncure"
Дата:
> 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)


Re: Win32 version question

От
Alvaro Herrera
Дата:
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"



Re: Win32 version question

От
"Joshua D. Drake"
Дата:
>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



Re: Win32 version question

От
Robert Treat
Дата:
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



Re: Win32 version question

От
"Merlin Moncure"
Дата:
> 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=#