Sean Z. wrote: > BTW, what's the best way to determine the installation folder, port > number used by an existing postgres server? From registry > HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations ? Yes. From a related doc I once wrote: When PostgreSQL is installed on Windows it adds a number of entries to the registry to allow pgAdmin and other applications to discover the installation and make use of it automatically. This system is being used further by the application stack builder project that I've been working on. The following registry keys are added: HKLM\Software\PostgreSQL\Installations\<Product Code>\Base Directory HKLM\Software\PostgreSQL\Installations\<Product Code>\Data Directory HKLM\Software\PostgreSQL\Installations\<Product Code>\Service ID HKLM\Software\PostgreSQL\Installations\<Product Code>\Version HKLM\Software\PostgreSQL\Services\<Service ID>\Data Directory HKLM\Software\PostgreSQL\Services\<Service ID>\Database Superuser HKLM\Software\PostgreSQL\Services\<Service ID>\Display Name HKLM\Software\PostgreSQL\Services\<Service ID>\Encoding HKLM\Software\PostgreSQL\Services\<Service ID>\Locale HKLM\Software\PostgreSQL\Services\<Service ID>\Port HKLM\Software\PostgreSQL\Services\<Service ID>\Product Code HKLM\Software\PostgreSQL\Services\<Service ID>\Service Account Where: Product Code is the product code GUID used in the installer package. This changes between major versions (ie. 8.1 -> 8.2). Base directory is the base installation directory, eg. C:\PostgreSQL\8.1 Data directory is the data directory, eg. C:\PostgreSQL\8.1\data Service ID is the identifier of the pg_ctl registration with the service control manager, eg. pgsql-8.1 Version is the major.minor version, e.g. 8.1 Database superuser is the name of the initial superuser in the cluster, eg. postgres Display name is the friendly name of the pg_ctl registration with the service control manager, eg. PostgreSQL Database Server (8.1) Encoding is the database encoding set at initdb, eg. LATIN1 Locale is the server locale set at installation, eg. English_United Kingdom Port is a DWORD value representing the port the server listens on, eg. 5432 Service account is the Windows user account that the pg_ctl service runs under, eg. MYPC\postgres The values are split into two sets of keys (with some duplication) to allow easy cross-referencing from service to installation and vice versa. Obviously <Product Code> and <Service ID> in the key paths should be replaced with the actual values. Regards, Dave. ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings