[fdo-commits] r680 - in branches/fdordbms-postgis/Providers/GenericRdbms: Inc Src/Fdo/Other Src/PostGIS Src/PostGIS/Fdo Src/PostGIS/SchemaMgr Src/PostGIS/SchemaMgr/Ph Src/PostGIS/SchemaMgr/Ph/Rd Src/UnitTest

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Jan 22 21:20:20 EST 2007


Author: mloskot
Date: 2007-01-22 21:20:20 -0500 (Mon, 22 Jan 2007)
New Revision: 680

Modified:
   branches/fdordbms-postgis/Providers/GenericRdbms/Inc/rdbi.h
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/Fdo/Other/FdoRdbmsSQLCommand.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Fdo/FdoRdbmsPostGisConnection.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.h
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Database.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/DbObject.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.h
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.h
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/ColumnReader.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.h
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/OwnerReader.cpp
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/PostGISSchemaMgr.vcproj
   branches/fdordbms-postgis/Providers/GenericRdbms/Src/UnitTest/UnitTestPostGIS.vcproj
Log:
New features and fixes in Physical Manger for PostGIS.

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Inc/rdbi.h
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Inc/rdbi.h	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Inc/rdbi.h	2007-01-23 02:20:20 UTC (rev 680)
@@ -119,6 +119,7 @@
 *  Define the maximum message size                                      *
 ************************************************************************/
 #define RDBI_MSG_SIZE       512
+
 /************************************************************************
 *  Total number of simultaneous open cursors                            *
 ************************************************************************/

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/Fdo/Other/FdoRdbmsSQLCommand.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/Fdo/Other/FdoRdbmsSQLCommand.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/Fdo/Other/FdoRdbmsSQLCommand.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -65,16 +65,16 @@
 // Sets the SQL statement to be executed as a string.
 void FdoRdbmsSQLCommand::SetSQLStatement(const wchar_t* value)
 {
-    if( m_SqlString )
+    if (NULL != value)
     {
+        // may throw
+        wchar_t* tmp = wcscpy(new wchar_t[wcslen(value)+1], value);
+
+        // should not throw
         delete[] m_SqlString;
-        m_SqlString = NULL;
-    }
 
-    if( value != NULL )
-    {
-        m_SqlString = new wchar_t[ wcslen( value ) + 1];
-        wcscpy( m_SqlString, value );
+        // assign new string safely
+        m_SqlString = tmp;
     }
 }
 

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Fdo/FdoRdbmsPostGisConnection.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Fdo/FdoRdbmsPostGisConnection.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/Fdo/FdoRdbmsPostGisConnection.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -319,18 +319,14 @@
 // TODO: externalize messages in logOpen
 void FdoRdbmsPostGisConnection::logOpen(char accessMode)
 {
-
-    // TODO: mloskot - walk through this call and apply appropriate changes
-	
-    int					i;
-	FdoStringP			sql_stmt;
-	int					new_user_num;
-	int					user_num;
-	char				lower_access[2];
-	int					rc;
-	GdbiStatement*		insertStmt = NULL;
-	GdbiStatement*		gdbiStmt = NULL;
-	GdbiQueryResult*	gdbiResult = NULL;
+	int rc;
+    int userNumNew;
+	int userNum;
+	char lower_access[2];
+    FdoStringP sqlStmt;
+	GdbiStatement* insertStmt = NULL;
+	GdbiStatement* gdbiStmt = NULL;
+	GdbiQueryResult* gdbiResult = NULL;
 		
     FdoSmPhMgrP phMgr = GetSchemaManager()->GetPhysicalSchema();
 
@@ -342,77 +338,105 @@
 
 	// check if f_dbopen exists
 
-
 	// TODO Delete "orphan" user rows in f_dbopen
 	// There is no PostGIS table to retrieve active sessions.
 
 	GetDbiConnection()->GetGdbiCommands()->tran_begin("update_db_open_table");
 
-	// get thread id of the current session
-	for (i = 0; i < OD_MAX_RETRY_COUNT; i++) {
-		new_user_num = -1;
-		if (i == 0)
+	// Get thread id of the current session
+    int retryCount;
+	for (retryCount = 0; retryCount < OD_MAX_RETRY_COUNT; retryCount++)
+    {
+		userNumNew = -1;
+		if (0 == retryCount)
 		{
-			sql_stmt =
-			FdoStringP::Format(L"select %ls, %ls, %ls from %ls where %ls = (select max(%ls) from %ls ) for update",
-				(FdoString*)FDO_DBUSER_COLUMN, (FdoString*)FDO_ACCESS_MODE_COLUMN, (FdoString*)FDO_USER_NUM_COLUMN,
-				(FdoString*)FDO_DBOPEN_TABLE, (FdoString*)FDO_USER_NUM_COLUMN, (FdoString*)FDO_USER_NUM_COLUMN, 
-				(FdoString*)FDO_DBOPEN_TABLE);
-			gdbiStmt = GetDbiConnection()->GetGdbiConnection()->Prepare((const wchar_t*)sql_stmt);
+			sqlStmt = FdoStringP::Format(
+                L"SELECT %ls, %ls, %ls "
+                L"FROM %ls WHERE %ls = (SELECT max(%ls) FROM %ls ) FOR UPDATE",
+				static_cast<FdoString*>(FDO_DBUSER_COLUMN),
+                static_cast<FdoString*>(FDO_ACCESS_MODE_COLUMN),
+                static_cast<FdoString*>(FDO_USER_NUM_COLUMN),
+				static_cast<FdoString*>(FDO_DBOPEN_TABLE),
+                static_cast<FdoString*>(FDO_USER_NUM_COLUMN),
+                static_cast<FdoString*>(FDO_USER_NUM_COLUMN), 
+				static_cast<FdoString*>(FDO_DBOPEN_TABLE)
+                );
+			gdbiStmt = GetDbiConnection()->GetGdbiConnection()->Prepare(
+                static_cast<const wchar_t*>(sqlStmt));
 		}
+
 		gdbiResult = gdbiStmt->ExecuteQuery();
 		gdbiResult->ReadNext();
 		rc = GetDbiConnection()->GetGdbiCommands()->err_stat();
 		if (rc == RDBI_END_OF_FETCH)
-			new_user_num = 0;
-		else	{
-			if (gdbiResult->GetIsNull((char *)GetDbiConnection()->GetUtility()->UnicodeToUtf8(FDO_ACCESS_MODE_COLUMN)) == false)	{
+			userNumNew = 0;
+		else
+        {
+			if (false == 
+                gdbiResult->GetIsNull(
+                    static_cast<const char*>(GetDbiConnection()->GetUtility()->UnicodeToUtf8(FDO_ACCESS_MODE_COLUMN))))
+            {
 					FdoInt8 s_access;
-					s_access = gdbiResult->GetInt8( (const wchar_t*)FDO_ACCESS_MODE_COLUMN,NULL, NULL );
-					if (s_access == 'e' || tolower(accessMode) == 'e')	{
+					s_access = gdbiResult->GetInt8(static_cast<const wchar_t*>(FDO_ACCESS_MODE_COLUMN), NULL, NULL);
+					if (s_access == 'e' || tolower(accessMode) == 'e')
+                    {
 						gdbiResult->Close();
 						GetDbiConnection()->GetGdbiCommands()->tran_end("update_db_open_table");
 						throw FdoConnectionException::Create(L"Database is exclusively locked");
 					}
 			}
-			user_num = 
-				(int)gdbiResult->GetInt64((char *)GetDbiConnection()->GetUtility()->UnicodeToUtf8(FDO_USER_NUM_COLUMN), 
-						                    NULL, NULL);
-			/*user_num = 
-				gdbiResult->GetInt32((char *)GetDbiConnection()->GetUtility()->UnicodeToUtf8(FDO_USER_NUM_COLUMN), 
-						                    NULL, NULL);*/
-			new_user_num = user_num +1;
+
+			userNum = (int)gdbiResult->GetInt64(
+                static_cast<const char*>(GetDbiConnection()->GetUtility()->UnicodeToUtf8(FDO_USER_NUM_COLUMN)),
+                NULL, NULL);
+
+			userNumNew = userNum + 1;
 		
 		}
 		// end select
-		if( gdbiResult )
+
+		if (gdbiResult)
 		{
 			gdbiResult->End();
 			delete gdbiResult;
 			gdbiResult = NULL;
 		}
-		if( gdbiStmt )
+
+		if (gdbiStmt)
 		{
 			delete gdbiStmt;
 			gdbiStmt = NULL;
 		}
-		if (i == 0)	{
-			sql_stmt = FdoStringP::Format(L"insert into %ls (%ls, %ls, %ls, %ls, %ls) values (?, ?, ?, current_date(), connection_id())",
-				(FdoString*)FDO_DBOPEN_TABLE, (FdoString*)FDO_DBUSER_COLUMN, (FdoString*)FDO_ACCESS_MODE_COLUMN, (FdoString*)FDO_USER_NUM_COLUMN, 
-				(FdoString*)FDO_OPENDATE_COLUMN, (FdoString*)FDO_SESSION_COLUMN);
-			insertStmt = GetDbiConnection()->GetGdbiConnection()->Prepare((const wchar_t*)sql_stmt);
+
+		if (retryCount == 0)
+        {
+			sqlStmt = FdoStringP::Format(
+                L"INSERT INTO %ls (%ls, %ls, %ls, %ls, %ls) "
+                L"VALUES ($1, $2, $3, current_date, pg_backend_pid())",
+				static_cast<FdoString*>(FDO_DBOPEN_TABLE),
+                static_cast<FdoString*>(FDO_DBUSER_COLUMN),
+                static_cast<FdoString*>(FDO_ACCESS_MODE_COLUMN),
+                static_cast<FdoString*>(FDO_USER_NUM_COLUMN), 
+				static_cast<FdoString*>(FDO_OPENDATE_COLUMN),
+                static_cast<FdoString*>(FDO_SESSION_COLUMN)
+                );
+            const wchar_t* query = static_cast<const wchar_t*>(sqlStmt);
+			insertStmt = GetDbiConnection()->GetGdbiConnection()->Prepare(query);
 		}
 
         FdoStringP user = GetDbiConnection()->GetUser();
 
-		insertStmt->Bind(1, GDBI_DB_NAME_SIZE, (const char *)user, NULL);
-		insertStmt->Bind(2, sizeof(char), (const char *)&lower_access, NULL);
-		insertStmt->Bind(3, &new_user_num, NULL);
-		try	{
+		insertStmt->Bind(1, GDBI_DB_NAME_SIZE, static_cast<const char*>(user), NULL);
+        //const char* access = lower_access;
+		insertStmt->Bind(2, 2, (const char *)&lower_access, NULL);
+		insertStmt->Bind(3, &userNumNew, NULL);
+		try
+        {
 			insertStmt->ExecuteNonQuery();
 			break;
 		}
-		catch (FdoException *ex)	{
+		catch (FdoException *ex)
+        {
 			rc = GetDbiConnection()->GetGdbiCommands()->err_stat();	
 			if (rc == RDBI_DUPLICATE_INDEX) {
 				ex->Release();
@@ -430,22 +454,24 @@
 	}
 	
 	GetDbiConnection()->GetGdbiCommands()->tran_end("update_db_open_table");
-	if( insertStmt )
+	if (insertStmt)
 	{
 		insertStmt->Free();
 		delete insertStmt;
 	}
-	if( gdbiResult )
+
+	if(gdbiResult)
 	{
 		gdbiResult->Close();
 		delete gdbiResult;
 		gdbiResult = NULL;
 	}
-	if (i == OD_MAX_RETRY_COUNT)
+
+	if (OD_MAX_RETRY_COUNT == retryCount)
         throw FdoConnectionException::Create(L"Max retry count (%1$d) exceeded. Open database failed.");
 	
 	// Remember user number set in F_DbOpen
-	SetUserNum(new_user_num);
+    SetUserNum(userNumNew);
 }
 
 void FdoRdbmsPostGisConnection::delOpen()
@@ -463,15 +489,15 @@
 
 	if (-1 != GetUserNum())
 	{
-		FdoStringP sql_stmt = 
-            FdoStringP::Format(L"delete from %ls where %ls = %d",
+		FdoStringP sqlStmt = 
+            FdoStringP::Format(L"DELETE FROM %ls WHERE %ls = %d",
                     static_cast<FdoString*>(FDO_DBOPEN_TABLE),
                     static_cast<FdoString*>(FDO_USER_NUM_COLUMN),
                     GetUserNum());
 
         // TODO: mloskot - check following chain call for null pointers
 		GdbiStatement* gdbiStmt = NULL;
-        gdbiStmt = GetDbiConnection()->GetGdbiConnection()->Prepare(static_cast<const wchar_t*>(sql_stmt));
+        gdbiStmt = GetDbiConnection()->GetGdbiConnection()->Prepare(static_cast<const wchar_t*>(sqlStmt));
 		rc = gdbiStmt->ExecuteNonQuery();
 		gdbiStmt->Free();
 

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/PostGIS.sln	2007-01-23 02:20:20 UTC (rev 680)
@@ -93,6 +93,7 @@
 		{4D87353A-981A-4B99-9262-516D4F677535} = {4D87353A-981A-4B99-9262-516D4F677535}
 		{67068A2A-B8E3-4206-AD5E-4CE1CD881AC4} = {67068A2A-B8E3-4206-AD5E-4CE1CD881AC4}
 		{80E04928-D74C-441C-8851-09B8BD281D5F} = {80E04928-D74C-441C-8851-09B8BD281D5F}
+		{11793E23-75E5-4407-AF82-BE0FC6994EBD} = {11793E23-75E5-4407-AF82-BE0FC6994EBD}
 		{9BF08D0E-CD3B-4687-86E2-6DB8270E94E9} = {9BF08D0E-CD3B-4687-86E2-6DB8270E94E9}
 		{E2DBE00A-1AAB-4CA3-B6FB-9CDE0FE5C553} = {E2DBE00A-1AAB-4CA3-B6FB-9CDE0FE5C553}
 		{F5346F00-C869-4B51-A947-FC097288C625} = {F5346F00-C869-4B51-A947-FC097288C625}
@@ -100,35 +101,24 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostGISDriver", "Driver\PostGISDriver.vcproj", "{69D1E6E5-9391-40FE-A989-B9BEBE3EE305}"
 	ProjectSection(ProjectDependencies) = postProject
+		{11793E23-75E5-4407-AF82-BE0FC6994EBD} = {11793E23-75E5-4407-AF82-BE0FC6994EBD}
 		{9BF08D0E-CD3B-4687-86E2-6DB8270E94E9} = {9BF08D0E-CD3B-4687-86E2-6DB8270E94E9}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTestPostGIS", "..\UnitTest\UnitTestPostGIS.vcproj", "{D2EF6A19-4817-4978-8D61-066A694A6A34}"
-	ProjectSection(ProjectDependencies) = postProject
-		{531AC4EE-B2BF-4FC9-8A03-EF272DCAEAB3} = {531AC4EE-B2BF-4FC9-8A03-EF272DCAEAB3}
-		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305} = {69D1E6E5-9391-40FE-A989-B9BEBE3EE305}
-		{86921DDB-715C-4E22-A107-41108E2D4FBB} = {86921DDB-715C-4E22-A107-41108E2D4FBB}
-		{A97744C0-DCC5-4D58-91B5-7DB006BD40C1} = {A97744C0-DCC5-4D58-91B5-7DB006BD40C1}
-		{001B698F-66FF-4486-AD57-53318CF47A4A} = {001B698F-66FF-4486-AD57-53318CF47A4A}
-		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
-		{C4BAD553-2752-4D33-8505-8332781E27E0} = {C4BAD553-2752-4D33-8505-8332781E27E0}
-		{9037A345-04EB-418C-98D0-3D5B19FC9D55} = {9037A345-04EB-418C-98D0-3D5B19FC9D55}
-		{E3307244-0639-4F87-A21B-B4369C0FD93F} = {E3307244-0639-4F87-A21B-B4369C0FD93F}
-		{080C612A-C598-476E-A0CC-5D98FA48B738} = {080C612A-C598-476E-A0CC-5D98FA48B738}
-		{9BF08D0E-CD3B-4687-86E2-6DB8270E94E9} = {9BF08D0E-CD3B-4687-86E2-6DB8270E94E9}
-	EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostGISOverrides", "SchemaMgr\PostGISOverrides.vcproj", "{86921DDB-715C-4E22-A107-41108E2D4FBB}"
 	ProjectSection(ProjectDependencies) = postProject
 		{2CFF7B5C-2CC5-435B-8E8E-C4AC3ACFEF83} = {2CFF7B5C-2CC5-435B-8E8E-C4AC3ACFEF83}
 		{4D87353A-981A-4B99-9262-516D4F677535} = {4D87353A-981A-4B99-9262-516D4F677535}
+		{11793E23-75E5-4407-AF82-BE0FC6994EBD} = {11793E23-75E5-4407-AF82-BE0FC6994EBD}
 		{9BF08D0E-CD3B-4687-86E2-6DB8270E94E9} = {9BF08D0E-CD3B-4687-86E2-6DB8270E94E9}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostGISSchemaMgr", "SchemaMgr\PostGISSchemaMgr.vcproj", "{C4BAD553-2752-4D33-8505-8332781E27E0}"
 	ProjectSection(ProjectDependencies) = postProject
 		{86921DDB-715C-4E22-A107-41108E2D4FBB} = {86921DDB-715C-4E22-A107-41108E2D4FBB}
+		{11793E23-75E5-4407-AF82-BE0FC6994EBD} = {11793E23-75E5-4407-AF82-BE0FC6994EBD}
 		{9BF08D0E-CD3B-4687-86E2-6DB8270E94E9} = {9BF08D0E-CD3B-4687-86E2-6DB8270E94E9}
+		{F5346F00-C869-4B51-A947-FC097288C625} = {F5346F00-C869-4B51-A947-FC097288C625}
 	EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{40FC3002-D93E-4EA0-884F-6FCE5CC8A77A}"
@@ -139,18 +129,73 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util_list_datastores", "..\UnitTest\util_list_datastores.vcproj", "{3FF70ADE-0220-4F38-A893-E6C1247DFCA5}"
 	ProjectSection(ProjectDependencies) = postProject
 		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+		{D2EF6A19-4817-4978-8D61-066A694A6A34} = {D2EF6A19-4817-4978-8D61-066A694A6A34}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util_list_providers", "..\UnitTest\util_list_providers.vcproj", "{2C132A4B-2602-4B29-8EAE-E7FC685FD507}"
 	ProjectSection(ProjectDependencies) = postProject
 		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+		{D2EF6A19-4817-4978-8D61-066A694A6A34} = {D2EF6A19-4817-4978-8D61-066A694A6A34}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util_run_sql_cmd", "..\UnitTest\util_run_sql_cmd.vcproj", "{736900C1-77C0-41B5-B433-74C2B49A3309}"
 	ProjectSection(ProjectDependencies) = postProject
 		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+		{D2EF6A19-4817-4978-8D61-066A694A6A34} = {D2EF6A19-4817-4978-8D61-066A694A6A34}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util_connect", "..\UnitTest\util_connect.vcproj", "{AC3C8965-006F-4E81-A793-AF0820108962}"
+	ProjectSection(ProjectDependencies) = postProject
+		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+		{D2EF6A19-4817-4978-8D61-066A694A6A34} = {D2EF6A19-4817-4978-8D61-066A694A6A34}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTestPostGIS", "..\UnitTest\UnitTestPostGIS.vcproj", "{D2EF6A19-4817-4978-8D61-066A694A6A34}"
+	ProjectSection(ProjectDependencies) = postProject
+		{531AC4EE-B2BF-4FC9-8A03-EF272DCAEAB3} = {531AC4EE-B2BF-4FC9-8A03-EF272DCAEAB3}
+		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305} = {69D1E6E5-9391-40FE-A989-B9BEBE3EE305}
+		{86921DDB-715C-4E22-A107-41108E2D4FBB} = {86921DDB-715C-4E22-A107-41108E2D4FBB}
+		{A97744C0-DCC5-4D58-91B5-7DB006BD40C1} = {A97744C0-DCC5-4D58-91B5-7DB006BD40C1}
+		{001B698F-66FF-4486-AD57-53318CF47A4A} = {001B698F-66FF-4486-AD57-53318CF47A4A}
+		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+		{C4BAD553-2752-4D33-8505-8332781E27E0} = {C4BAD553-2752-4D33-8505-8332781E27E0}
+		{9037A345-04EB-418C-98D0-3D5B19FC9D55} = {9037A345-04EB-418C-98D0-3D5B19FC9D55}
+		{E3307244-0639-4F87-A21B-B4369C0FD93F} = {E3307244-0639-4F87-A21B-B4369C0FD93F}
+		{080C612A-C598-476E-A0CC-5D98FA48B738} = {080C612A-C598-476E-A0CC-5D98FA48B738}
+		{9BF08D0E-CD3B-4687-86E2-6DB8270E94E9} = {9BF08D0E-CD3B-4687-86E2-6DB8270E94E9}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util_create_datastore", "..\UnitTest\util_create_datastore.vcproj", "{E0CA53E6-10C5-4889-AA76-37318421B372}"
+	ProjectSection(ProjectDependencies) = postProject
+		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "com", "com", "{6196F41D-2159-4FEC-955E-F23CCE53A768}"
+	ProjectSection(SolutionItems) = preProject
+		..\..\com\f_associationdefinition.sql = ..\..\com\f_associationdefinition.sql
+		..\..\com\f_attributedefinition.sql = ..\..\com\f_attributedefinition.sql
+		..\..\com\f_attributedependencies.sql = ..\..\com\f_attributedependencies.sql
+		..\..\com\f_classdefinition.sql = ..\..\com\f_classdefinition.sql
+		..\..\com\f_classtype.sql = ..\..\com\f_classtype.sql
+		..\..\com\f_dbopen.sql = ..\..\com\f_dbopen.sql
+		..\..\com\f_feature.sql = ..\..\com\f_feature.sql
+		..\..\com\f_options.sql = ..\..\com\f_options.sql
+		..\..\com\f_sad.sql = ..\..\com\f_sad.sql
+		..\..\com\f_schemainfo.sql = ..\..\com\f_schemainfo.sql
+		..\..\com\f_schemaoptions.sql = ..\..\com\f_schemaoptions.sql
+		..\..\com\f_spatialcontext.sql = ..\..\com\f_spatialcontext.sql
+		..\..\com\f_spatialcontextgeom.sql = ..\..\com\f_spatialcontextgeom.sql
+		..\..\com\f_spatialcontextgroup.sql = ..\..\com\f_spatialcontextgroup.sql
+		..\..\com\postgis_fdo_sys.sql = ..\..\com\postgis_fdo_sys.sql
+		..\..\com\postgis_fdo_sys_idx.sql = ..\..\com\postgis_fdo_sys_idx.sql
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util_describe_schema", "..\UnitTest\util_describe_schema.vcproj", "{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{D2EF6A19-4817-4978-8D61-066A694A6A34} = {D2EF6A19-4817-4978-8D61-066A694A6A34}
+		{DFC59C58-1267-42A0-A8EE-4E4FC19040B7} = {DFC59C58-1267-42A0-A8EE-4E4FC19040B7}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -377,18 +422,6 @@
 		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305}.ReleaseDynamic|Win32.Build.0 = ReleaseDynamic|Win32
 		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305}.ReleaseOra|Win32.ActiveCfg = ReleaseDynamic|Win32
 		{69D1E6E5-9391-40FE-A989-B9BEBE3EE305}.ReleaseOra|Win32.Build.0 = ReleaseDynamic|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Debug|Win32.ActiveCfg = Debug|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Debug|Win32.Build.0 = Debug|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugDynamic|Win32.Build.0 = Debug|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugOra|Win32.ActiveCfg = Debug|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugOra|Win32.Build.0 = Debug|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Release|Win32.ActiveCfg = Release|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Release|Win32.Build.0 = Release|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseDynamic|Win32.Build.0 = Release|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseOra|Win32.ActiveCfg = Release|Win32
-		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseOra|Win32.Build.0 = Release|Win32
 		{86921DDB-715C-4E22-A107-41108E2D4FBB}.Debug|Win32.ActiveCfg = Debug|Win32
 		{86921DDB-715C-4E22-A107-41108E2D4FBB}.Debug|Win32.Build.0 = Debug|Win32
 		{86921DDB-715C-4E22-A107-41108E2D4FBB}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
@@ -449,6 +482,54 @@
 		{736900C1-77C0-41B5-B433-74C2B49A3309}.ReleaseDynamic|Win32.Build.0 = Release|Win32
 		{736900C1-77C0-41B5-B433-74C2B49A3309}.ReleaseOra|Win32.ActiveCfg = Release|Win32
 		{736900C1-77C0-41B5-B433-74C2B49A3309}.ReleaseOra|Win32.Build.0 = Release|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.Debug|Win32.ActiveCfg = Debug|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.Debug|Win32.Build.0 = Debug|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.DebugDynamic|Win32.Build.0 = Debug|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.DebugOra|Win32.ActiveCfg = Debug|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.DebugOra|Win32.Build.0 = Debug|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.Release|Win32.ActiveCfg = Release|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.Release|Win32.Build.0 = Release|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.ReleaseDynamic|Win32.Build.0 = Release|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.ReleaseOra|Win32.ActiveCfg = Release|Win32
+		{AC3C8965-006F-4E81-A793-AF0820108962}.ReleaseOra|Win32.Build.0 = Release|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Debug|Win32.Build.0 = Debug|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugDynamic|Win32.Build.0 = Debug|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugOra|Win32.ActiveCfg = Debug|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.DebugOra|Win32.Build.0 = Debug|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Release|Win32.ActiveCfg = Release|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.Release|Win32.Build.0 = Release|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseDynamic|Win32.Build.0 = Release|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseOra|Win32.ActiveCfg = Release|Win32
+		{D2EF6A19-4817-4978-8D61-066A694A6A34}.ReleaseOra|Win32.Build.0 = Release|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.Debug|Win32.Build.0 = Debug|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.DebugDynamic|Win32.Build.0 = Debug|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.DebugOra|Win32.ActiveCfg = Debug|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.DebugOra|Win32.Build.0 = Debug|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.Release|Win32.ActiveCfg = Release|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.Release|Win32.Build.0 = Release|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.ReleaseDynamic|Win32.Build.0 = Release|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.ReleaseOra|Win32.ActiveCfg = Release|Win32
+		{E0CA53E6-10C5-4889-AA76-37318421B372}.ReleaseOra|Win32.Build.0 = Release|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.Debug|Win32.Build.0 = Debug|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.DebugDynamic|Win32.ActiveCfg = Debug|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.DebugDynamic|Win32.Build.0 = Debug|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.DebugOra|Win32.ActiveCfg = Debug|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.DebugOra|Win32.Build.0 = Debug|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.Release|Win32.ActiveCfg = Release|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.Release|Win32.Build.0 = Release|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.ReleaseDynamic|Win32.ActiveCfg = Release|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.ReleaseDynamic|Win32.Build.0 = Release|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.ReleaseOra|Win32.ActiveCfg = Release|Win32
+		{5B687AED-0A54-4595-B4A7-ADF0A8BFC04D}.ReleaseOra|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -18,7 +18,7 @@
 #include "ColTypeMapper.h"
 
 // This Map currently has a few duplicates.
-// This is ok since the column type mapper simply
+// This is OK since the column type mapper simply
 // uses the first matched entry.
 
 namespace
@@ -28,54 +28,91 @@
 }
 
 //
-// BLOB
+// Binary Data Types
 //
-static TypeEntry blobEntry(FdoSmPhColType_BLOB, L"longblob");
-static TypeEntry binaryEntry(FdoSmPhColType_BLOB, L"binary");
-static TypeEntry mediumBlobEntry(FdoSmPhColType_BLOB, L"mediumblob");
-static TypeEntry tinyBlobEntry(FdoSmPhColType_BLOB, L"tinyblob");
-static TypeEntry varbinaryEntry(FdoSmPhColType_BLOB, L"varbinary");
 
+static TypeEntry byteaEntry(FdoSmPhColType_BLOB, L"bytea");
+//static TypeEntry byteaEntry(FdoSmPhColType_Byte, L"bytea");
+
 //
-// Date
+// Date/Time Types
 //
-static TypeEntry dateTimeEntry(FdoSmPhColType_Date, L"datetime");
+
 static TypeEntry dateEntry(FdoSmPhColType_Date, L"date");
-static TypeEntry timeStampEntry(FdoSmPhColType_Date, L"timestamp");
 static TypeEntry timeEntry(FdoSmPhColType_Date, L"time");
-static TypeEntry yearEntry(FdoSmPhColType_Int32, L"year");
+static TypeEntry abstimeEntry(FdoSmPhColType_Date, L"abstime");
+static TypeEntry timestampEntry(FdoSmPhColType_Date, L"timestamp");
+static TypeEntry timestamptzEntry(FdoSmPhColType_Date, L"timestamp with time zone");
+static TypeEntry timestampwtzEntry(FdoSmPhColType_Date, L"timestamp without time zone");
 
 //
-// Numeric
+// Numeric Types
 //
-static TypeEntry longIntEntry(FdoSmPhColType_Int32, L"int");
-static TypeEntry bigIntEntry(FdoSmPhColType_Int64, L"bigint");
-static TypeEntry medIntEntry(FdoSmPhColType_Int32, L"mediumint");
-static TypeEntry smallIntEntry(FdoSmPhColType_Int16, L"smallint");
-static TypeEntry byteEntry(FdoSmPhColType_Byte, L"tinyint", true);
-static TypeEntry tinyIntEntry(FdoSmPhColType_Int16, L"tinyint");
+
+// Integer Types
+static TypeEntry smallintEntry(FdoSmPhColType_Int16, L"smallint");
+static TypeEntry integerEntry(FdoSmPhColType_Int32, L"integer");
+static TypeEntry bigintEntry(FdoSmPhColType_Int64, L"bigint");
+static TypeEntry int2Entry(FdoSmPhColType_Int16, L"int2");
+static TypeEntry int4Entry(FdoSmPhColType_Int32, L"int4");
+static TypeEntry int8Entry(FdoSmPhColType_Int64, L"int8");
+
+// Serial Types
+// serial type is mapped automatically to integer
+
+// Arbitrary Precision Numbers
+static TypeEntry numericEntry(FdoSmPhColType_Decimal, L"numeric");
 static TypeEntry decimalEntry(FdoSmPhColType_Decimal, L"decimal");
-static TypeEntry singleEntry(FdoSmPhColType_Single, L"single");
-static TypeEntry doubleEntry(FdoSmPhColType_Double, L"double");
-// value range for unsigned long is not inside range for FDO int32,
-// so map to int64 instead
-static TypeEntry ulongIntEntry(FdoSmPhColType_Int64, L"int", true);
-// similarly, map unsigned small to int32 instead of int16
-static TypeEntry usmallIntEntry(FdoSmPhColType_Int32, L"smallint", true);
+// Note:  The money type is deprecated.
+static TypeEntry moneyEntry(FdoSmPhColType_Decimal, L"money");
 
+// Floating-Point Types
+static TypeEntry realEntry(FdoSmPhColType_Single, L"real");
+static TypeEntry doubleEntry(FdoSmPhColType_Double, L"double precision");
+static TypeEntry float4Entry(FdoSmPhColType_Single, L"float4");
+static TypeEntry float8Entry(FdoSmPhColType_Double, L"float8");
+
 //
 // Text
 //
-static TypeEntry stringEntry(FdoSmPhColType_String, L"varchar");
+
+static TypeEntry characterEntry(FdoSmPhColType_String, L"character");
+static TypeEntry charactervaryingEntry(FdoSmPhColType_String, L"character varying");
+static TypeEntry nameEntry(FdoSmPhColType_String, L"name");
+static TypeEntry textEntry(FdoSmPhColType_String, L"text");
 static TypeEntry charEntry(FdoSmPhColType_String, L"char");
-static TypeEntry textEntry(FdoSmPhColType_String, L"text");
-static TypeEntry longTextEntry(FdoSmPhColType_String, L"longtext");
-static TypeEntry mediumTextEntry(FdoSmPhColType_String, L"mediumtext");
+static TypeEntry bpcharEntry(FdoSmPhColType_String, L"bpchar");
+static TypeEntry varcharEntry(FdoSmPhColType_String, L"varchar");
+// Note: 'cstring' is a pseudo-type and represents a null-terminated C string
+static TypeEntry cstringEntry(FdoSmPhColType_String, L"cstring");
 
 //
+// Boolean Type
+//
+
+static TypeEntry boolEntry(FdoSmPhColType_Bool, L"bool");
+static TypeEntry booleanEntry(FdoSmPhColType_Bool, L"boolean");
+
+//
+// Object Identifier Types
+//
+// Note: There are no FDO types for PostgreSQL identifiers,
+//       so they're mapped to integer types
+
+static TypeEntry oidEntry(FdoSmPhColType_Int32, L"oid");
+static TypeEntry cidEntry(FdoSmPhColType_Int32, L"cid");
+static TypeEntry xidEntry(FdoSmPhColType_Int32, L"xid");
+// Note: tid is 6-bytes long
+static TypeEntry tidEntry(FdoSmPhColType_Int64, L"tid");
+
+//
 // Geometry
 //
-static TypeEntry geomEntry(FdoSmPhColType_Geom, L"geometry",
+
+//################################################
+// TODO: mloskot - check geometry_columns
+//################################################
+static TypeEntry geometryEntry(FdoSmPhColType_Geom, L"geometry",
                            FdoGeometryType_MultiGeometry,
                            FdoGeometricType_Point
                            | FdoGeometricType_Curve
@@ -112,63 +149,70 @@
                                    FdoGeometricType_Surface);
 
 //
-// Other
+// Unknown Types
 //
-static TypeEntry enumEntry(FdoSmPhColType_String, L"enum");
-static TypeEntry setEntry(FdoSmPhColType_String, L"set");
 
+static TypeEntry anyEntry(FdoSmPhColType_Unknown, L"any");
+static TypeEntry anyarrayEntry(FdoSmPhColType_Unknown, L"anyarray");
+static TypeEntry anyelementEntry(FdoSmPhColType_Unknown, L"anyelement");
+static TypeEntry arrayEntry(FdoSmPhColType_Unknown, L"ARRAY");
+static TypeEntry cidrEntry(FdoSmPhColType_Unknown, L"cidr");
+static TypeEntry inetEntry(FdoSmPhColType_Unknown, L"inet");
+static TypeEntry macaddrEntry(FdoSmPhColType_Unknown, L"macaddr");
+static TypeEntry internalEntry(FdoSmPhColType_Unknown, L"internal");
+static TypeEntry voidEntry(FdoSmPhColType_Unknown, L"void");
 
+
 TypeEntry* FdoSmPhPostGisColTypeMapper::mMap[] =
 {
-    &blobEntry,
-    &binaryEntry,
-    &mediumBlobEntry,
-    &tinyBlobEntry,
-    &varbinaryEntry,
-    &dateTimeEntry,
+    &byteaEntry,
     &dateEntry,
-    &timeStampEntry,
     &timeEntry,
+    &abstimeEntry,
+    &timestampEntry,
+    &timestamptzEntry,
+    &timestampwtzEntry,
+    &smallintEntry,
+    &integerEntry,
+    &bigintEntry,
+    &int2Entry,
+    &int4Entry,
+    &int8Entry,
+    &numericEntry,
     &decimalEntry,
-    &singleEntry,
+    &moneyEntry,
+    &realEntry,
     &doubleEntry,
-    &geomEntry,
-    &pointEntry,
-    &lineStringEntry,
-    &polygonEntry,
-    &geomCollectionEntry,
-    &multiPointEntry,
-    &multiLineStringEntry,
-    &multiPolygonEntry,
-    &stringEntry,
-    &longIntEntry,
-    &bigIntEntry,
-    &medIntEntry,
-    &smallIntEntry,
-    &byteEntry,
-    &tinyIntEntry,
+    &float4Entry,
+    &float8Entry,
+    &characterEntry,
+    &charactervaryingEntry,
+    &nameEntry,
+    &textEntry,
     &charEntry,
-    &textEntry,
-    &longTextEntry,
-    &mediumTextEntry,
-    &enumEntry,
-    &setEntry,
-    &yearEntry,
-    &ulongIntEntry,
-    &usmallIntEntry,
+    &bpcharEntry,
+    &varcharEntry,
+    &cstringEntry,
+    &boolEntry,
+    &booleanEntry,
+    &oidEntry,
+    &cidEntry,
+    &xidEntry,
+    &tidEntry,
+    &geometryEntry,
+
     NULL // This array must be null terminated.
 };
 
 FdoSmPhPostGisColTypeMapEntry::FdoSmPhPostGisColTypeMapEntry(
     FdoSmPhColType colType,
-    FdoString* colTypeString,
-    bool isUnsigned)
+    FdoString* colTypeString)
+    : mColType(colType), 
+      mColTypeString(FdoStringP(colTypeString, false)),
+      mColFdoGeometryType(0),
+      mColFdoGeometricType(0)
 {
-    mColType = colType;
-    mColTypeString = FdoStringP(colTypeString, false);
-    mIsUnsigned = isUnsigned;
-    mColFdoGeometryType = 0;
-    mColFdoGeometricType = 0;
+    // idle
 }
 
 FdoSmPhPostGisColTypeMapEntry::FdoSmPhPostGisColTypeMapEntry(
@@ -176,12 +220,12 @@
     FdoString* colTypeString,
     FdoInt32 colFdoGeometryType,
     FdoInt32 colFdoGeometricType)
+    : mColType(colType), 
+      mColTypeString(FdoStringP(colTypeString, false)),
+      mColFdoGeometryType(colFdoGeometryType),
+      mColFdoGeometricType(colFdoGeometricType)
 {
-    mColType = colType;
-    mColTypeString = FdoStringP(colTypeString, false);
-    mIsUnsigned = false;
-    mColFdoGeometryType = colFdoGeometryType;
-    mColFdoGeometricType = colFdoGeometricType;
+    // idle
 }
 
 FdoSmPhPostGisColTypeMapEntry::~FdoSmPhPostGisColTypeMapEntry()
@@ -201,7 +245,6 @@
 
 FdoSmPhColType FdoSmPhPostGisColTypeMapper::String2Type(
     FdoString* colTypeString,
-    bool isUnsigned,
     int size,
     int scale)
 {
@@ -239,8 +282,7 @@
             TypeEntry* mapEntry = mMap[i];
 
             // pass 0 matches the sign, pass 1 does not.
-            if ((mapEntry->mColTypeString == colTypeString)
-                 && ((1 == pass) || (mapEntry->mIsUnsigned == isUnsigned)))
+            if ((mapEntry->mColTypeString == colTypeString) && ((1 == pass)))
             {
                 // found so return the string.
                 return mapEntry->mColType;

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.h
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.h	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/ColTypeMapper.h	2007-01-23 02:20:20 UTC (rev 680)
@@ -32,18 +32,17 @@
     /// \param
     /// colType [in] - enum facet.
     /// \param
-    /// colTypeString [in] - corresponding string representation of type.
+    /// colTypeName [in] - corresponding string representation of type.
     ///
     FdoSmPhPostGisColTypeMapEntry(FdoSmPhColType colType,
-        FdoString* colTypeString,
-        bool isUnsigned = false);
+        FdoString* colTypeName);
 
     /// Create a column type mapping.
     ///
     /// \todo To be documented.
     ///
     FdoSmPhPostGisColTypeMapEntry(FdoSmPhColType colType,
-        FdoString* colTypeString,
+        FdoString* colTypeName,
         FdoInt32 colFdoGeometryType,
         FdoInt32 colFdoGeometricType);
 
@@ -56,10 +55,7 @@
     ///
     FdoString* GetName() const;
 
-    //
-    // TODO: mloskot - Why following data memebers are public?
-    //                 Access performance?
-    //
+    // TODO: mloskot - Consider moving following data memebers to private.
 
     /// \todo To be documented.
     FdoSmPhColType mColType;
@@ -68,9 +64,6 @@
     FdoStringP mColTypeString;
     
     /// \todo To be documented.
-    bool mIsUnsigned;
-    
-    /// \todo To be documented.
     FdoInt32 mColFdoGeometryType;
     
     /// \todo To be documented.
@@ -78,7 +71,12 @@
 
 }; // class FdoSmPhPostGisColTypeMapEntry
 
+inline FdoString* FdoSmPhPostGisColTypeMapEntry::GetName() const
+{
+    return mColTypeString;
+}
 
+
 /// Defines mapper that lists all FDO property types with their
 /// corresponding enumeration facet and string representations.
 ///
@@ -98,7 +96,6 @@
     /// colTypeString [in] - string of type mapped to enumerator.
     ///
     static FdoSmPhColType String2Type(FdoString* colTypeString,
-        bool isUnsigned = false,
         int size = 0,
         int scale = 0);
 
@@ -122,13 +119,5 @@
 
 }; // class FdoSmPhPostGisColTypeMapper
 
-//
-// Implementation of inline member
-//
 
-inline FdoString* FdoSmPhPostGisColTypeMapEntry::GetName() const
-{
-    return mColTypeString;
-}
-
 #endif // FDOSMPHPOSTGISCOLTYPEMAPPER_H
\ No newline at end of file

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Database.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Database.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Database.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -54,6 +54,8 @@
     pgDb = const_cast<FdoSmPhPostGisDatabase*>(this);
     FDO_SAFE_ADDREF(pgDb);
 
+    // Create owner reader instance used to read collection of datastores
+    // (schemas) available in currently connected PostgreSQL database.
     FdoSmPhRdPostGisOwnerReader* reader = NULL;
     reader = new FdoSmPhRdPostGisOwnerReader(pgDb, owner);
 

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/DbObject.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/DbObject.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/DbObject.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -422,6 +422,7 @@
 PostGISOvStorageEngineType FdoSmPhPostGisDbObject::StorageEngineStringToEnum(
     FdoString* engine)
 {
+    assert(!"To be removed");
     // PostgreSQL supports one type of engine, we call it default,
     // so "Default" name is expected.
 
@@ -440,7 +441,7 @@
 FdoString* FdoSmPhPostGisDbObject::StorageEngineEnumToString(
     PostGISOvStorageEngineType engine)
 {
-    assert(PostGISOvStorageEngineType_Default == engine);
+    assert(!"To be removed");
 
     FdoString* ret = L"Default";    
     return ret;

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -191,7 +191,7 @@
     // TODO: mloskot - Check if COALESCE works well here.
 
     FdoStringP sql = FdoStringP::Format(
-        L" COALESCE(%ls,%ls) %ls",
+        L" COALESCE(%ls,%ls) AS %ls",
         static_cast<FdoString*>(colName),
         static_cast<FdoString*>(FormatSQLVal(defaultValue, fieldType)),
         static_cast<FdoString*>(fieldName));
@@ -261,9 +261,11 @@
 {
     // TODO: mloskot - Review this list for PgSQL.
 
+    assert("!TO BE REVIEWD");
+
     // The following are reserved words specific to PostgreSQL/PostGIS.
     // Base constructor adds general reserved words to this list.
-
+    
     Insert(L"bigint"); 
     Insert(L"binary"); 
     Insert(L"blob"); 

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.h
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.h	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Mgr.h	2007-01-23 02:20:20 UTC (rev 680)
@@ -153,6 +153,25 @@
     /// \todo To be documented.
     virtual FdoSize ColNameMaxLen();
 
+
+    //
+    // TODO: mloskot - Testing private SC impl.
+    //
+    //virtual FdoPtr<FdoSmPhSpatialContextWriter> NewSpatialContextWriter()
+    //{
+    //    return NULL;
+    //}
+    //virtual FdoPtr<FdoSmPhSpatialContextGroupWriter> NewSpatialContextGroupWriter()
+    //{
+    //    return NULL;
+    //}
+
+
+    //virtual FdoPtr<FdoSmPhSpatialContextGroupReader> CreateSpatialContextGroupReader()
+    //{
+    //    return NULL;
+    //}
+
 protected:
 
     /// \todo To be documented.

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -32,7 +32,7 @@
 #include <cassert>
 
 //
-// Forward declaractions for RDBI layer.
+// Forward declaractions for RDBI components.
 // 
 struct postgis_context_def;
 
@@ -42,18 +42,12 @@
 }
 
 //
-// Static definitions.
-//
-FdoInt32 FdoSmPhPostGisOwner::mTempTableNum = 0;
-FdoCommonThreadMutex FdoSmPhPostGisOwner::mMutex;
-
-//
 // FdoSmPhPostGisOwner implementation.
 //
 
 FdoSmPhPostGisOwner::FdoSmPhPostGisOwner()
 {
-    // idle
+    Init();
 }
 
 FdoSmPhPostGisOwner::FdoSmPhPostGisOwner(FdoStringP name,
@@ -63,7 +57,7 @@
     FdoSmPhRdDbObjectReader* reader)
     : FdoSmPhGrdOwner(name, hasMetaSchema, pDatabase, state)
 {
-    // idle
+    Init();
 }
 
 FdoSmPhPostGisOwner::~FdoSmPhPostGisOwner()
@@ -71,145 +65,44 @@
     // idle
 }
 
-FdoStringP FdoSmPhPostGisOwner::GetKeyColumnUsageTable()
+void FdoSmPhPostGisOwner::Init()
 {
-    // TODO: mloskot - About MySQL's provider logic
-    // Do we need rewriting these tables for PostGIS?
+    mTablesTable = L"information_schema.tables";
+    mColumnsTable = L"information_schema.columns";
 
-    FdoStringP table;
-
-    if (L"" == mTableConstraintsTable) 
-    {
-        table = L"information_schema.key_column_usage";
-    }
-    else
-    {
-        table = FdoStringP(L"\"") + GetName()
-                + L"\".\"" + mKeyColumnUsageTable + L"\"";
-    }
-
-    return table;
+    mTableConstraintsTable = L"information_schema.table_constraints";
+    mKeyColumnUsageTable = L"information_schema.key_column_usage";
 }
 
-FdoStringP FdoSmPhPostGisOwner::GetTableConstraintsTable()
+FdoStringP FdoSmPhPostGisOwner::GetTablesTable() const
 {
-    // TODO: mloskot - About MySQL's provider logic
-    // Do we need rewriting these tables for PostGIS?
-    
-    FdoStringP table;
-
-    if (L"" == mTableConstraintsTable) 
-    {
-        table = L"information_schema.table_constraints";
-    }
-    else
-    {
-        table = FdoStringP(L"\"") + GetName()
-                + L"\".\"" + mTableConstraintsTable + L"\"";
-    }
-
-    return table;
+    assert(mTablesTable.GetLength() > 0);
+    return mTablesTable;
 }
 
-FdoStringP FdoSmPhPostGisOwner::GetTablesTable(bool createTemp)
+FdoStringP FdoSmPhPostGisOwner::GetColumnsTable() const
 {
-    // TODO: mloskot - Genreal note for ALL GetXXXTable functions:
-    //
-    // Existing permanent tables with the same name are not visible to
-    // the current session while the temporary table exists,
-    // unless they are referenced with schema-qualified names.
-
-    if (createTemp)
-    {
-        // TODO: mloskot - About MySQL's provider logic
-        // Do we need rewriting these tables for PostGIS?
-        assert(!"Not implemented");
-    }
-
-    FdoStringP table;
-
-    if (L"" == mTablesTable)
-    {
-        table = L"information_schema.tables";
-    }
-    else
-    {
-        table = FdoStringP(L"\"") + GetName()
-                + L"\".\"" + mTablesTable + L"\"";
-    }
-
-    return table;
+    assert(mColumnsTable.GetLength() > 0);
+    return mColumnsTable;
 }
 
-FdoStringP FdoSmPhPostGisOwner::GetColumnsTable(bool createTemp)
+FdoStringP FdoSmPhPostGisOwner::GetTableConstraintsTable() const
 {
-    if (createTemp)
-    {
-        // TODO: mloskot - About MySQL's provider logic
-        // Do we need rewriting these tables for PostGIS?
-        assert(!"Not implemented");
-    }
-
-    FdoStringP table;
-
-    if (L"" == mTablesTable)
-    {
-        table = L"information_schema.columns";
-    }
-    else
-    {
-        table = FdoStringP(L"\"") + GetName()
-                + L"\".\"" + mTablesTable + L"\"";
-    }
-
-    return table;
+    assert(mTableConstraintsTable.GetLength() > 0);
+    return mTableConstraintsTable;
 }
 
-void FdoSmPhPostGisOwner::DropTempTables()
+FdoStringP FdoSmPhPostGisOwner::GetKeyColumnUsageTable() const
 {
-    DropKeyColumnUsageTable();
-    DropTableConstraintsTable();
-    DropTablesTable();
-    DropColumnsTable();
+    assert(mKeyColumnUsageTable.GetLength() > 0);
+    return mKeyColumnUsageTable;
 }
 
-void FdoSmPhPostGisOwner::DropKeyColumnUsageTable()
-{
-    DropTempTable(mKeyColumnUsageTable);
-
-    mKeyColumnUsageTable = L"";
-}
-
-void FdoSmPhPostGisOwner::DropTableConstraintsTable()
-{
-    DropTempTable(mTableConstraintsTable);
-
-    mTableConstraintsTable = L"";
-}
-
-void FdoSmPhPostGisOwner::DropTablesTable()
-{
-    DropTempTable(mTablesTable);
-
-    mTablesTable = L"";
-}
-
-void FdoSmPhPostGisOwner::DropColumnsTable()
-{
-    DropTempTable(mColumnsTable);
-
-    mColumnsTable = L"";
-}
-
 void FdoSmPhPostGisOwner::SetCurrent()
 {
+    FdoStringP name(GetName());
     FdoSmPhPostGisMgrP mgr(GetManager()->SmartCast<FdoSmPhPostGisMgr>());
 
-    FdoStringP name(GetName());
-
-    // TODO: Check if set_schema hasn't been
-    // update to accept const char*
-
     rdbi_set_schema(mgr->GetRdbiContext(),
         static_cast<const char*>(name));
 }
@@ -378,19 +271,19 @@
     gdbiConn = mgr->GetGdbiConnection();
     assert(NULL != gdbiConn);
 
+    // TODO: mloskot - What about creating PgSQL database from scratch?
+    // using template_postgis, etc.?
+    // Old version where owner = database:
+    // FdoStringP sqlStmt = FdoStringP::Format(
+    // L"CREATE DATABASE %ls TEMPLATE template_postgis ENCODING 'UTF8'", static_cast<FdoString*>(GetDbName()));
+
     // TODO: mloskot - Use POSTGIS_TEMPLATE_DBNAME constant
-    // TODO: mloskot - Should we specify OWNER? Currently, OWNER is the user
-    // executing following SQL. So, it's admin, not a regular user.
-    // What if database is created to be used by a regular user?
-    // Then OWNER is parameter required.   
 
     FdoStringP sqlStmt = FdoStringP::Format(
-        L"CREATE DATABASE %ls "
-        L"TEMPLATE template_postgis "
-        L"ENCODING 'UTF8'",
+        L"CREATE SCHEMA %ls",
         static_cast<FdoString*>(GetDbName()));
 
-    // Create the owner (datastore)
+    // Create the owner (PostgreSQL schema = FDO datastore)
     gdbiConn->ExecuteNonQuery(static_cast<const char*>(sqlStmt));
 
     if (GetHasMetaSchema())
@@ -410,6 +303,9 @@
         {
             try
             {
+                // TODO: mloskot - What if no default owner is available?
+                
+                // On error, switch back to default owner
                 FdoSmPhOwnerP prevOwner(mgr->FindOwner());                
                 if (prevOwner)
                     prevOwner->SetCurrent();
@@ -421,7 +317,7 @@
             throw;
         }
 		
-		if (GetIsSystem() == false)
+		if (!GetIsSystem())
         {
 			SetOptions();
         }
@@ -431,12 +327,18 @@
         if (prevOwner)
             prevOwner->SetCurrent();
 
-        //TODO: spatial handling?
+        // TODO: mloskot - What does 'spatial handling' mean?
+        // TODO: spatial handling?
     }
     
     return true;
 }
 
+bool FdoSmPhPostGisOwner::Modify()
+{
+    return true;
+}
+
 bool FdoSmPhPostGisOwner::Delete()
 {
     FdoSmPhPostGisMgrP mgr(GetManager()->SmartCast<FdoSmPhPostGisMgr>());
@@ -445,6 +347,8 @@
     gdbiConn = mgr->GetGdbiConnection();
     assert(NULL != gdbiConn);
 
+    assert(!"TODO: DROP SCHEMA");
+
     FdoStringP sqlStmt = FdoStringP::Format(
         L"DROP DATABASE IF EXISTS %ls",
         static_cast<FdoString*>(GetDbName()));
@@ -503,39 +407,13 @@
 {
     // Notify base about commit event.
     FdoSmPhOwner::OnAfterCommit();
-
-    // After physical schema modification,drop temporary tables so they will be regenerated
-    // with new snapshot of information_schema.
-    // This also prevents temporary tables from accumulating when successive ApplySchema commands
-    // are executed.
-    DropTempTables();
 }
 
-FdoInt32 FdoSmPhPostGisOwner::NextTempTableNum()
-{
-    // Generate unique number in threadsafe manner
-    mMutex.Enter();
-    mTempTableNum++;
-    mMutex.Leave();
-
-    return mTempTableNum;
-}
-    
-void FdoSmPhPostGisOwner::DropTempTable(FdoStringP tableName)
-{
-    // TODO: mloskot - First, do we need temporary version of
-    // information_schema?
-    assert(!"Not implemented");
-
-    // TODO: mloskot - Temporary tables are automatically dropped at
-    // the end of a session, or optionally at the end of the current
-    // transaction.
-}
-
 FdoString* FdoSmPhPostGisOwner::GetDbNameClause(bool isEqual)
 {
 	if (isEqual)
-		return L"schemaname = current_database()";
+		return L"schemaname = current_schema()";
 	else
-		return L"schemaname != current_database()";
+		return L"schemaname != current_schema()";
 }
+

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.h
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.h	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Owner.h	2007-01-23 02:20:20 UTC (rev 680)
@@ -24,13 +24,14 @@
 #include <Sm/Ph/Rd/TableJoin.h>
 
 /// Defines owner class for PostGIS provider.
-/// Owner represents a schema (user).
+/// Owner represents a schema (datastore).
 ///
 class FdoSmPhPostGisOwner : public FdoSmPhGrdOwner
 {
 public:
 
     /// Constructs an instance of an Owner object.
+    /// Initializesz names of information_schema elements.
     ///
     /// \param
     /// name [in] - owner name
@@ -48,44 +49,14 @@
     /// Destructor.
     ~FdoSmPhPostGisOwner();
 
-    ////////////////////////////////////////////////////////////////////////////////////
-    // TODO: mloskot - Verify folloing notes:
-    //
-    // The following two functions support a performance enhancement. Queries that join two 
-    // information_schema tables are slow. The Schema Manager currently runs queries that 
-    // join table_constraints and key_column_usage. These functions create temporary indexed
-    // tables for table_constraints and key_column_usage and return the temporary table name.
-    // The temporary table can then be queried instead of the information_schema table. 
-    // The performance is magnitudes better when the PostGis instance has a lot of schema.
-    //
-    // Each temporary table is built on the first call to each of these functions by a Schema Manager.
-    // They are built per PostGIS database and connection. Synchronization happens each time 
-    // an ApplySchemaCommand is performed. This causes the Schema Managers to free their caches,
-    // causing these temporary tables to be rebuilt the next time these functions are called.
-    ////////////////////////////////////////////////////////////////////////////////////
-
-    /// Build and return temporary table for
-    /// information_schema.key_column_usage.
-    ///
-    /// \todo To be documented
-    ///
-    FdoStringP GetKeyColumnUsageTable();
-
-    /// Build and return temporary table for
-    /// information_schema.table_constraints.
-    ///
-    /// \todo To be documented
-    ///
-    FdoStringP GetTableConstraintsTable();
-
-    /// Build and return temporary table for information_schema.tables.
+    /// Build and return tem    porary table for information_schema.tables.
     /// \param
     /// createTemp [in] - false - don't create temporary table.
     /// If it doesn't yet exist return information_schema.tables instead.
     ///
     /// \todo To be documented
     ///
-    FdoStringP GetTablesTable(bool createTemp);
+    FdoStringP GetTablesTable() const;
 
     /// Build and return temporary table for information_schema.columns.
     /// \param
@@ -94,25 +65,22 @@
     ///
     /// \todo To be documented
     ///
-    FdoStringP GetColumnsTable(bool createTemp);
+    FdoStringP GetColumnsTable() const;
 
-    /// Drop temporary tables.
-    /// Calls all subsequent temporary tables deleters for
-    /// key_column_usage, table_constraints, tables and columns.
-    void DropTempTables();
+    /// Build and return temporary table for
+    /// information_schema.table_constraints.
+    ///
+    /// \todo To be documented
+    ///
+    FdoStringP GetTableConstraintsTable() const;
 
-    /// Drop temporary version of information_schema.key_column_usage table.
-    void DropKeyColumnUsageTable();
+    /// Build and return temporary table for
+    /// information_schema.key_column_usage.
+    ///
+    /// \todo To be documented
+    ///
+    FdoStringP GetKeyColumnUsageTable() const;
 
-    /// Drop temporary version of information_schema.table_constraints table.
-    void DropTableConstraintsTable();
-
-    /// Drop temporary version of information_schema.tables table.
-    void DropTablesTable();
-
-    /// Drop temporary version of information_schema.columns table.
-    void DropColumnsTable();
-
 	/// Get the function name that returns the datastore
     /// name from the server.
     /// \param
@@ -173,7 +141,7 @@
 protected:
     
     /// Default constructor.
-    /// No initialization steps required.
+    /// Initializesz names of information_schema elements.
     FdoSmPhPostGisOwner();
 
     // Table and View creation implementors
@@ -193,25 +161,22 @@
 
     //TODO: nothing to update yet. However, should
     //throw an exception when Modify() is called.
-    virtual bool Modify() { return true; }
+    virtual bool Modify();
 
     virtual bool Delete();
 
-
 private:
-    // Drop the given temporary table
-    void DropTempTable( FdoStringP tableName );
-    // Generate next unique number for temporary table name.
-    FdoInt32 NextTempTableNum();
 
-    FdoStringP mKeyColumnUsageTable;
-    FdoStringP mTableConstraintsTable;
+    /// Initializes internal state of the owner instance.
+    /// This function is called from the class constructors and
+    /// sets collects names of information_schema elements.
+    void Init();
+
     FdoStringP mTablesTable;
     FdoStringP mColumnsTable;
+    FdoStringP mTableConstraintsTable;
+    FdoStringP mKeyColumnUsageTable;
 
-    static FdoInt32 mTempTableNum;
-    static FdoCommonThreadMutex mMutex;
-
 };
 
 /// \brief

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/ColumnReader.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/ColumnReader.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/ColumnReader.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -1,4 +1,4 @@
-//
+ //
 // Copyright (C) 2006 Refractions Research, Inc.
 // 
 // This library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@
 #include "../Owner.h"
 #include "../../../../SchemaMgr/Ph/Rd/QueryReader.h"
 
+#include <cassert>
+
 FdoSmPhRdPostGisColumnReader::FdoSmPhRdPostGisColumnReader(FdoSmPhMgrP mgr,
     FdoSmPhDbObjectP dbObject)
     : FdoSmPhRdColumnReader(
@@ -53,9 +55,10 @@
     {
         bool isUnsigned = (GetLong(L"", L"isunsigned") != 0);
 
+        SetBoolean( L"", L"is_autoincremented", false );
+
         mColType = FdoSmPhPostGisColTypeMapper::String2Type(
             GetString(L"", L"type_string"),
-            isUnsigned,
             GetLong(L"", L"size"), 
             GetLong(L"", L"scale"));
     }
@@ -77,105 +80,91 @@
     FdoStringP objectName(dbObject ? dbObject->GetName() : L"");
     FdoStringP ownerName(owner->GetName());
 
-    // Use temporary table when not selecting all columns for this owner. When repeated selects
-    // done against information_schema.columns, it is more efficient to build and use a temporary table.
-    FdoStringP columnsTableName = 
-        ((FdoSmPhPostGisOwner*)(FdoSmPhOwner*)owner)->GetColumnsTable(join || (objectName != L""));
+    const FdoSmPhPostGisOwner* pgOwner = NULL;
+    pgOwner = static_cast<const FdoSmPhPostGisOwner*>(owner);
+    assert(NULL != pgOwner);
 
+    FdoStringP columnsTableName(pgOwner->GetColumnsTable());
+
+    // TODO: cache the reader
     FdoSmPhReaderP reader;
-    // todo: cache the reader
     if (!reader)
     {
         // Generate sql statement if not already done
 
         // If joining to another table, generated from sub-clause for table.
         FdoStringP joinFrom;
-        if ((NULL != join) && (L"" == objectName)) 
+        if ((NULL != join) && (0 == objectName.GetLength()))
         {
-            joinFrom = FdoStringP::Format(L", %ls\n", 
+            joinFrom = FdoStringP::Format(L", %ls", 
                 static_cast<FdoString*>(join->GetFrom()));
         }
 
         FdoStringP qualification;
 
-        if (L"" != objectName)
+        if (objectName.GetLength() > 0)
         {
             // Selecting single object, qualify by this object.
-            qualification = L"  and table_name collate utf8_bin = ?\n";
+            qualification = L" AND c.table_name = $2 ";
         } 
         else
         {
             if (NULL != join)
             {
                 // Otherwise, if joining to another table, generated join clause.
-                qualification = FdoStringP::Format(L"  and (%ls)\n",
-                    static_cast<FdoString*>(join->GetWhere(L"table_name")));
+                qualification = FdoStringP::Format(L" AND (%ls) ",
+                    static_cast<FdoString*>(join->GetWhere(L"c.table_name")));
             }
         }
 
-// template_postgis=# \d information_schema.columns
-//          Column          |     Type        | 
-// -------------------------+-----------------+
-// table_catalog            | sql_identifier  | <- Always the current database
-// table_schema             | sql_identifier  | <- Schema in the current database
-// table_name               | sql_identifier  |
-// column_name              | sql_identifier  |
-// ordinal_position         | cardinal_number | <- Count starts at 1
-// column_default           | character_data  |
-// is_nullable              | character_data  |
-// data_type                | character_data  |
-// character_maximum_length | cardinal_number | <- NULL for non-text/non-bit-string types 
-// character_octet_length   | cardinal_number | <- NULL for non-text types 
-// numeric_precision        | cardinal_number |
-// numeric_precision_radix  | cardinal_number |
-// numeric_scale            | cardinal_number |
-// character_set_name       | sql_identifier  | <- Not avilable in PostgreSQL
-// collation_name           | sql_identifier  | <- Not avilable in PostgreSQL
-// is_updatable             | character_data  | <- YES always for BASE TABLE
+        // template_postgis=# \d information_schema.columns
+        //          Column          |     Type        | 
+        // -------------------------+-----------------+
+        // table_catalog            | sql_identifier  | <- Always the current database
+        // table_schema             | sql_identifier  | <- Schema in the current database
+        // table_name               | sql_identifier  |
+        // column_name              | sql_identifier  |
+        // ordinal_position         | cardinal_number | <- Count starts at 1
+        // column_default           | character_data  |
+        // is_nullable              | character_data  |
+        // data_type                | character_data  |
+        // character_maximum_length | cardinal_number | <- NULL for non-text/non-bit-string types 
+        // character_octet_length   | cardinal_number | <- NULL for non-text types 
+        // numeric_precision        | cardinal_number |
+        // numeric_precision_radix  | cardinal_number |
+        // numeric_scale            | cardinal_number |
+        // character_set_name       | sql_identifier  | <- Not avilable in PostgreSQL
+        // collation_name           | sql_identifier  | <- Not avilable in PostgreSQL
+        // is_updatable             | character_data  | <- YES always for BASE TABLE
 
+        // FDO needs a size (length) for types that become strings.
+        // For such types that don't allow size to be set, the following query
+        // returns the  max length for the type, as size.
 
-//
-// TODO: mloskot - Do following notes apply to all FDO providers or MySQL only?
-//
-
-        // FDO needs a size (length) for types that become strings. For such types 
-        // that don't allow size to be set, the following query returns the 
-        // max length for the type, as size.
-
         // Length for bit columns is not stored in any of the lenght or precision
-        // fields so it is parsed out of column_type, which will have format
-        // "bit(n)" where n is the number of bits.
+        // fields so it is parsed out of column_type, which will have
+        // format of bit(n) where n is the number of bits.
 
-        // Note: the maximum length for longtext is actually 4294967295 but
-        // the max length of an FDO Data Property is 2147483647.
+        // TODO: mloskot - Currently, if there is no length available for
+        // text types, 64 KB is assumed as max text size.
+        // Although, in PostgreSQL, the longest possible character string that
+        // can be stored is about 1 GB.
 
-        // Names of PostgreSQL objects: database, table, field and columns
-        // are case-independent, unless you created them with double-quotes
-        // around their name, in which case they are case-sensitive.
-        // NOTE: In MySQL, table names can be case-sensitive or not,
-        //       depending on which operating system you are using.
-        //       On Linux, names are case-sensitive.
-
-        // TODO: mloskot - Check if following tables are selected:
-        //       FROM information_schema.tables AS t,
-        //            information_schema.columns AS c
-
-        // TODO: mloskot - Check joinFrom and qualification clauses
-
         // $1 - name of table
 
         sql = FdoStringP::Format(
-            L"SELECT %ls t.table_name, c.column_name, c.data_type,"
+            L"SELECT %ls c.table_name, c.column_name AS name, 1 AS type,"
             L"COALESCE(c.character_maximum_length, c.character_octet_length,"
-            L"c.numeric_precision) AS size,"
-            L"c.numeric_scale,"
+            L"         c.numeric_precision) AS size,"
+            L"c.numeric_scale AS scale  ,"
             L"CASE WHEN c.is_nullable = 'YES' THEN 1 ELSE 0 END AS nullable,"
+            L"lower(c.data_type) AS type_string,"
             L"0 AS isunsigned,"
-            L"FROM %ls %ls "
-            L"WHERE t.table_name = c.table_name"
-            L"AND t.table_name = $1"
+            L"0 AS is_autoincremented "
+            L"FROM %ls AS c %ls "
+            L"WHERE c.table_schema = $1"
             L" %ls "
-            L"ORDER BY t.table_name, c.ordinal_position ASC",
+            L"ORDER BY c.table_name, c.ordinal_position ASC",
             (join ? L"distinct" : L""),
             static_cast<FdoString*>(columnsTableName),
             static_cast<FdoString*>(joinFrom),
@@ -238,7 +227,7 @@
     // Schema and table entries in INFORMATION_SCHEMA are always lower case
     field->SetFieldValue(tableOwner);
 
-    if (L"" != tableName)
+    if (tableName.GetLength() > 0)
     {
         field = new FdoSmPhField(row, L"table_name",
                 rowObj->CreateColumnDbObject(L"table_name", false));

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -51,11 +51,14 @@
     FdoSmPhDbObjType retType = FdoSmPhDbObjType_Unknown;
 
     FdoStringP type;
-    type = GetString (L"", L"type");
+    type = GetString(L"", L"type");
 
-    if (L"base table" == type)
+    // TODO: mloskot - FdoStringP has missing operators
+    // Following doesn't work: (L"base table" = type)
+
+    if (type == L"base table")
         retType = FdoSmPhDbObjType_Table;
-    else if (L"view" == type)
+    else if (type == L"view")
         retType = FdoSmPhDbObjType_View;
 
     return retType;
@@ -73,16 +76,11 @@
     FdoStringP ownerName(owner->GetName());
     FdoStringP dblinkName(owner->GetParent()->GetName());
 
-    // Use temporary table when not selecting all tables for this owner.
-    // When repeated selects done against information_schema.tables,
-    // it is more efficient to build and use a temporary table.
-
     FdoSmPhPostGisOwner* pgOwner = NULL;
     pgOwner = static_cast<FdoSmPhPostGisOwner*>(owner.p);
     assert(NULL != pgOwner);
 
-    FdoStringP tablesTableName(
-        pgOwner->GetTablesTable(join || (L"" != objectName)));
+    FdoStringP tablesTableName(pgOwner->GetTablesTable());
 
     FdoSmPhMgrP mgr(owner->GetManager());
     
@@ -98,38 +96,33 @@
 
     FdoSmPhReaderP reader;
 
-    // TODO: cache the queries for performance
-    //if (isObjectSet)
-    //    reader = pMgr->GetDbObjectReader(isDblinkSet);
-    //else
-    //    reader = pMgr->GetDbObjectsReader(isDblinkSet);
-
     if (!reader)
     {
         // Generate SQL statement if not already done
 
         // If joining to another table, generated from sub-clause for table.
         FdoStringP joinFrom;
-        if ((NULL != join) && (L"" == objectName)) 
+        if ((NULL != join) && (0 == objectName.GetLength()))
         {
-            joinFrom = FdoStringP::Format(L"  , %ls\n",
+            joinFrom = FdoStringP::Format(L", %ls ",
                 static_cast<FdoString*>(join->GetFrom()));
         }
 
         FdoStringP qualification;
 
-        if (L"" != objectName)
+        if (objectName.GetLength() > 0)
         {
             // Selecting single object, qualify by this object.
-            qualification = L"  and ist.table_name collate utf8_bin = ?\n";
+            // $2 - qualification takes a second place in the SQL query
+            qualification = L" AND t.table_name = $2 ";
         } 
         else
         {
             if (NULL != join)
             {
                 // Otherwise, if joining to another table, generated join clause.
-                qualification = FdoStringP::Format(L"  and (%ls)\n",
-                    static_cast<FdoString*>(join->GetWhere(L"ist.table_name")));
+                qualification = FdoStringP::Format(L" AND (%ls) ",
+                    static_cast<FdoString*>(join->GetWhere(L"t.table_name")));
             }
         }
 
@@ -162,18 +155,18 @@
         // TODO: mloskot - Remove unused fields.
 
         sqlString = FdoStringP::Format(
-            L"SELECT %ls t.table_name AS name,"
-            L"lower(t.table_type) AS type,"
-            L"' '::text AS autoincrement_column_name,"
-            L"0 AS autoincrement_column_seed,"
-            L"' '::text AS storage_engine,"
-            L"' '::text AS data_directory,"
-            L"' '::text AS index_directory"
-            L"FROM %ls AS t %ls"
-            L"WHERE t.table_schema = 'public'"
-            L" %ls "
-            L"AND t.table_type IN ('BASE TABLE','VIEW')"
-            L"ORDER BY t.table_name ASC",
+            L"SELECT %ls t.table_name AS name, "
+            L"lower(t.table_type) AS type, "
+            L"' '::text AS autoincrement_column_name, "
+            L"0 AS autoincrement_column_seed, "
+            L"' '::text AS storage_engine, "
+            L"' '::text AS data_directory, "
+            L"' '::text AS index_directory "
+            L"FROM %ls AS t %ls "
+            L"WHERE t.table_schema = $1 "
+            L"%ls"
+            L"AND t.table_type IN ('BASE TABLE','VIEW') "
+            L"ORDER BY t.table_name ASC ",
             (join ? L"distinct" : L""),
             static_cast<FdoString*>(tablesTableName),
             static_cast<FdoString*>(joinFrom),
@@ -184,12 +177,6 @@
 
         reader = new FdoSmPhRdGrdQueryReader(row, sqlString, mgr,
             MakeBinds(mgr, ownerName, objectName));
-
-        // TODO
-        //if (isObjectSet)
-        //    pMgr->SetDbObjectReader(reader, isDblinkSet);
-        //else
-        //    pMgr->SetDbObjectsReader(reader, isDblinkSet);
     }
     else
     {

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.h
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.h	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/DbObjectReader.h	2007-01-23 02:20:20 UTC (rev 680)
@@ -45,21 +45,32 @@
     /// Destructor the database object reader.
     ~FdoSmPhRdPostGisDbObjectReader();
 
-    /// \todo To be documented.
+    /// Get the type of the current database object.
+    /// Currently, the reader recognizes following types:
+    /// - FdoSmPhDbObjType_Table
+    /// - FdoSmPhDbObjType_View
+    /// - FdoSmPhDbObjType_Unknown
+    ///
+    /// \return
+    /// Type of current database object.
+    ///
     virtual FdoSmPhDbObjType GetType();
 
 protected:
 
+    /// Generates SQL query and attaches it to the database object reader.
+    ///
     /// \param
     /// owner [in] - get objects owned by this owner.
     /// \param
     /// objectName [in] - If empty string then get all objects
     /// for the owner. Otherwise retrieve only this object.
     /// \param
-    /// join [in] - 
+    /// join [in] - object representing a join on table name to
+    /// a table that contains a column that has table names as its values.
+    /// \return
+    /// Instance of Physical Schema reader for a database object.
     ///
-    /// \todo To be documented.
-    ///
     FdoSmPhReaderP MakeQueryReader(FdoSmPhOwnerP owner,
         FdoStringP objectName = L"",
         FdoSmPhRdTableJoinP join = NULL);

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/OwnerReader.cpp
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/OwnerReader.cpp	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/Ph/Rd/OwnerReader.cpp	2007-01-23 02:20:20 UTC (rev 680)
@@ -39,8 +39,8 @@
 {
     bool isOwnerSet = true;
     
-    FdoStringP sqlString;
     FdoSmPhMgrP mgr(database->GetManager());
+
     FdoSmPhPostGisMgr* pgMgr = NULL;
     pgMgr = static_cast<FdoSmPhPostGisMgr*>(mgr.p);
 
@@ -49,58 +49,36 @@
 
     FdoSmPhReaderP reader;
 
-    // TODO: mloskot - What is this commented code for and from?
-    // There are no object_set or dblink_set variables
-    // in this class/function. Is this a copy-paste stuff?
-
-// TODO: cache the queries for performance
-/*
-    if ( object_set ) 
-        reader = pMgr->GetOwnerReader(dblink_set);
-    else
-        reader = pMgr->GetOwnersReader(dblink_set);
-*/
-
-    // TODO: create constant for F_SCHEMAINFO
     if (!reader)
     {
-        // Generate sql statement if not already done
+        // Generate SQL statement to query datastores (owners).
+        // If no owner is given, query all datastores (schemas)
+        // available in connected PostgreSQL server.
 
-        // Names of PostgreSQL objects: database, table, field and columns
-        // are case-independent, unless you created them with double-quotes
-        // around their name, in which case they are case-sensitive.
-        // NOTE: In MySQL, table names can be case-sensitive or not,
-        //       depending on which operating system you are using.
-        //       On Linux, names are case-sensitive.
+        // $1 - name of particular datastore (schema in PostgreSQL)
 
-        // $1 - name of particular schema
+        FdoStringP sqlString;
 
         sqlString = FdoStringP::Format(
-            L"SELECT schema_name AS name, "
-            L"(SELECT table_name "
-            L"FROM information_schema.tables AS t "
-            L"WHERE s.schema_name = t.table_schema "
-            L"AND t.table_name = 'F_SCHEMAINFO') AS schemas_table "
-            L"FROM information_schema.schemata AS s "
+            L"SELECT s.table_schema AS name, "
+            L"(SELECT t.table_name FROM information_schema.tables AS t "
+            L" WHERE s.table_schema = t.table_schema "
+            L" AND t.table_name = 'f_schemainfo') AS schemas_table "
+            L"FROM information_schema.tables AS s "
+            L"WHERE s.table_type = 'BASE TABLE' "
+            L"AND s.table_schema NOT IN ('pg_catalog', 'information_schema') "
             L" %ls "
-            L"ORDER BY schema_name ASC",
-            (isOwnerSet ? L"WHERE s.schema_name = $1" : L""));
+            L"GROUP BY s.table_schema "
+            L"ORDER BY s.table_schema ASC",
+            (isOwnerSet ? L"AND s.table_schema = $1" : L"")
+        );
 
-        FdoSmPhRowsP rows = MakeRows( mgr );
+        FdoSmPhRowsP rows = MakeRows(mgr);
         FdoSmPhRowP row = rows->GetItem(0);
 
-        reader = new FdoSmPhRdGrdQueryReader(row, sqlString, mgr, MakeBinds(mgr,ownerName) );
+        reader = new FdoSmPhRdGrdQueryReader(row, sqlString, mgr,
+            MakeBinds(mgr, ownerName));
 
-        
-        // TODO: mloskot - What is this commented code for and from?
-        // There are no object_set or dblink_set variables
-        // in this class/function. Is this a copy-paste stuff?
-        /*
-        if ( object_set ) 
-            pMgr->SetOwnerReader(reader, dblink_set);
-        else
-            pMgr->SetOwnersReader(reader, dblink_set);
-        */
     }
     else
     {
@@ -113,6 +91,8 @@
 
         if (isOwnerSet)
         {
+            // TODO: mloskot - Why 'owner_name' instead of 'name' ?
+
             FdoSmPhFieldP field(fields->GetItem(L"owner_name"));
             field->SetFieldValue(ownerName);
         }
@@ -126,36 +106,32 @@
 FdoSmPhRowP FdoSmPhRdPostGisOwnerReader::MakeBinds(FdoSmPhMgrP mgr,
     FdoStringP ownerName)
 {
-    FdoSmPhRowP row(new FdoSmPhRow(mgr, L"Binds"));
-    FdoSmPhDbObjectP rowDbObj(row->GetDbObject());
+    FdoSmPhRowP binds(new FdoSmPhRow(mgr, L"Binds"));
+    FdoSmPhDbObjectP rowDbObj(binds->GetDbObject());
 
     if (ownerName.GetLength() > 0)
     {
-        FdoSmPhFieldP field(new FdoSmPhField(row, L"owner_name",
+        FdoSmPhFieldP field(new FdoSmPhField(binds, L"owner_name",
             rowDbObj->CreateColumnDbObject(L"owner_name", false)));
 
         field->SetFieldValue(ownerName); 
     }
 
-    return row;
+    return binds;
 }
 
 FdoStringP FdoSmPhRdPostGisOwnerReader::GetDescription()
 {
-    FdoStringP sqlString;
-    FdoStringP ownerName(this->GetName());
+    FdoStringP ownerName(GetName());
 
     FdoSmPhMgrP mgr(mDatabase->GetManager());
     FdoSmPhRowP row(new FdoSmPhRow(mgr, L"fields")); 
     FdoSmPhDbObjectP rowDbObj(row->GetDbObject());
-    
 
-    // TODO: mloskot - Check this crash for PostgreSQL
-    // FdoStringP qownerName = rowObj->GetDbQName(); CRASH!
-
-    sqlString = FdoStringP::Format(
-        L"SELECT t.description FROM %ls.f_schemainfo AS t"
-        L"WHERE t.schemaname = '%ls'",
+    FdoStringP sqlString = FdoStringP::Format(
+        L"SELECT description "
+        L"FROM %ls.f_schemainfo "
+        L"WHERE schemaname = '%ls'",
         static_cast<FdoString*>(ownerName),
         static_cast<FdoString*>(ownerName));
 
@@ -165,8 +141,8 @@
  
 	FdoSmPhRowP binds(new FdoSmPhRow(mgr, L"Binds"));
 
-    FdoSmPhRdGrdQueryReaderP queryReader(new FdoSmPhRdGrdQueryReader(
-        row, sqlString, mgr, binds));
+    FdoSmPhRdGrdQueryReaderP queryReader(
+        new FdoSmPhRdGrdQueryReader(row, sqlString, mgr, binds));
 
 	FdoStringP	description;
     

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/PostGISSchemaMgr.vcproj
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/PostGISSchemaMgr.vcproj	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/PostGIS/SchemaMgr/PostGISSchemaMgr.vcproj	2007-01-23 02:20:20 UTC (rev 680)
@@ -326,6 +326,10 @@
 					>
 				</File>
 				<File
+					RelativePath=".\Ph\SpatialContextGroupReader.cpp"
+					>
+				</File>
+				<File
 					RelativePath="Ph\Table.cpp"
 					>
 				</File>
@@ -523,6 +527,10 @@
 					>
 				</File>
 				<File
+					RelativePath=".\Ph\SpatialContextGroupReader.h"
+					>
+				</File>
+				<File
 					RelativePath="Ph\Table.h"
 					>
 				</File>

Modified: branches/fdordbms-postgis/Providers/GenericRdbms/Src/UnitTest/UnitTestPostGIS.vcproj
===================================================================
--- branches/fdordbms-postgis/Providers/GenericRdbms/Src/UnitTest/UnitTestPostGIS.vcproj	2007-01-23 02:18:54 UTC (rev 679)
+++ branches/fdordbms-postgis/Providers/GenericRdbms/Src/UnitTest/UnitTestPostGIS.vcproj	2007-01-23 02:20:20 UTC (rev 680)
@@ -422,8 +422,8 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Performing fake install"
-						CommandLine="copy providers.xml $(OutDir)&#x0D;&#x0A;copy PostGisInit.txt $(OutDir)&#x0D;&#x0A;copy g_coords.txt $(OutDir)&#x0D;&#x0A;copy polyAttr.txt $(OutDir)&#x0D;&#x0A;mkdir $(OutDir)\com&#x0D;&#x0A;copy ..\..\com\fdo_sys.sql $(OutDir)\com&#x0D;&#x0A;copy ..\..\com\fdo_sys_idx.sql $(OutDir)\com&#x0D;&#x0A;copy ..\..\com\fdosys_sys.sql $(OutDir)\com&#x0D;&#x0A;copy *.xml $(OutDir)&#x0D;&#x0A;del /F $(OutDir)\*_master.txt&#x0D;&#x0A;copy *_master.txt $(OutDir)&#x0D;&#x0A;del /F $(OutDir)\*_in.xml&#x0D;&#x0A;copy *_in.xml $(OutDir)&#x0D;&#x0A;del /F $(OutDir)\*.xslt&#x0D;&#x0A;copy *.xslt $(OutDir)&#x0D;&#x0A;copy ..\..\Bin\Win32\Debug\RdbmsOverrides.dll $(OutDir)&#x0D;&#x0A;copy ..\..\Bin\Win32\Debug\PostGISOverrides.dll $(OutDir)&#x0D;&#x0A;copy ..\..\Bin\Win32\Debug\PostGISProvider.dll $(OutDir)&#x0D;&#x0A;copy $(FDOUTILITIES)\SchemaMgr\Bin\Win32\Debug\SmMessage.dll $(OutDir)&#x0D;&#x0A;echo &quot;delete me please&quot;&gt;$(OutDir)\FakeInstall.ilk&#x0D;&#x0A;"
-						AdditionalDependencies="providers.xml;PostGisInit.txt;g_coords.txt;polyAttr.txt;..\..\com\fdo_sys.sql;..\..\com\fdo_sys_idx.sql;..\..\com\fdosys_sys.sql;describeSchemas.xml;FdoSchemaTest_SqlServerOutput.xml;SchemaOverrideAll.xml;SchemaOverrideAll2.xml;SchemaOverrideErr.xml;smtables_logical.xml;smtables_physical.xml;temp_out.xml;apply_schema_err1_master.txt;apply_schema_err2_master.txt;apply_schema_err2M_master.txt;apply_schema_err3_master.txt;apply_schema_err3S_master.txt;apply_schema_err3M_master.txt;apply_schema_err4_master.txt;apply_schema_err5_master.txt;apply_schema_err5M_master.txt;apply_schema_err6_master.txt;apply_schema_err6S_master.txt;apply_schema_err7_master.txt;apply_schema_err8_master.txt;apply_schema_err8M_master.txt;apply_schema_err9_master.txt;apply_schema_overrides_out1.xml;apply_schema_overrides_out2.xml;apply_schema_test1_master.txt;apply_schema_test2_master.txt;apply_schema_test3_master.txt;apply_schema_test_ov1_master.txt;apply_schema_test_ov2_master.txt;apply_schema_test_ov3_master.txt;gen_default1_PostGIS_master.txt;gen_default1_Oracle_master.txt;gen_default1_SqlServer_master.txt;impexp_err1_master.txt;impexp_err7_master.txt;impexp2a_master.txt;impexp2b_master.txt;SchemaOverrideAll2_master.txt;SchemaOverrideErrHigh_master.txt;SchemaOverrideErrLow_master.txt;SchemaOverrideErrNormal_master.txt;apply_schema_overrides3_master.txt;apply_schema_overrides_out1_master.txt;apply_schema_overrides_out2_master.txt;schemaGenConfig1_master.txt;apply_schema_overrides1_master.txt;apply_schema_overrides2_master.txt;temp_in.xml;config1_in.xml;schema_rb_nnyn_master.txt;..\..\Bin\Win32\Debug\RdbmsOverrides.dll;..\..\Bin\Win32\Debug\PostGISOverrides.dll;..\..\Bin\Win32\Debug\PostGISProvider.dll;$(FDOUTILITIES)\SchemaMgr\Bin\Win32\Debug\SmMessage.dll;OverrideBender.xslt"
+						CommandLine="copy providers.xml $(OutDir)&#x0D;&#x0A;copy PostGisInit.txt $(OutDir)&#x0D;&#x0A;copy g_coords.txt $(OutDir)&#x0D;&#x0A;copy polyAttr.txt $(OutDir)&#x0D;&#x0A;mkdir $(OutDir)\com&#x0D;&#x0A;copy ..\..\com\postgis_fdo_sys.sql $(OutDir)\com\fdo_sys.sql&#x0D;&#x0A;copy ..\..\com\postgis_fdo_sys_idx.sql $(OutDir)\com\fdo_sys_idx.sql&#x0D;&#x0A;copy ..\..\com\fdosys_sys.sql $(OutDir)\com&#x0D;&#x0A;copy *.xml $(OutDir)&#x0D;&#x0A;del /F $(OutDir)\*_master.txt&#x0D;&#x0A;copy *_master.txt $(OutDir)&#x0D;&#x0A;del /F $(OutDir)\*_in.xml&#x0D;&#x0A;copy *_in.xml $(OutDir)&#x0D;&#x0A;del /F $(OutDir)\*.xslt&#x0D;&#x0A;copy *.xslt $(OutDir)&#x0D;&#x0A;copy ..\..\Bin\Win32\Debug\RdbmsOverrides.dll $(OutDir)&#x0D;&#x0A;copy ..\..\Bin\Win32\Debug\PostGISOverrides.dll $(OutDir)&#x0D;&#x0A;copy ..\..\Bin\Win32\Debug\PostGISProvider.dll $(OutDir)&#x0D;&#x0A;copy $(FDOUTILITIES)\SchemaMgr\Bin\Win32\Debug\SmMessage.dll $(OutDir)&#x0D;&#x0A;echo &quot;delete me please&quot;&gt;$(OutDir)\FakeInstall.ilk&#x0D;&#x0A;"
+						AdditionalDependencies="providers.xml;PostGisInit.txt;g_coords.txt;polyAttr.txt;..\..\com\postgis_fdo_sys.sql;..\..\com\postgis_fdo_sys_idx.sql;..\..\com\fdosys_sys.sql;describeSchemas.xml;FdoSchemaTest_SqlServerOutput.xml;SchemaOverrideAll.xml;SchemaOverrideAll2.xml;SchemaOverrideErr.xml;smtables_logical.xml;smtables_physical.xml;temp_out.xml;apply_schema_err1_master.txt;apply_schema_err2_master.txt;apply_schema_err2M_master.txt;apply_schema_err3_master.txt;apply_schema_err3S_master.txt;apply_schema_err3M_master.txt;apply_schema_err4_master.txt;apply_schema_err5_master.txt;apply_schema_err5M_master.txt;apply_schema_err6_master.txt;apply_schema_err6S_master.txt;apply_schema_err7_master.txt;apply_schema_err8_master.txt;apply_schema_err8M_master.txt;apply_schema_err9_master.txt;apply_schema_overrides_out1.xml;apply_schema_overrides_out2.xml;apply_schema_test1_master.txt;apply_schema_test2_master.txt;apply_schema_test3_master.txt;apply_schema_test_ov1_master.txt;apply_schema_test_ov2_master.txt;apply_schema_test_ov3_master.txt;gen_default1_PostGIS_master.txt;gen_default1_Oracle_master.txt;gen_default1_SqlServer_master.txt;impexp_err1_master.txt;impexp_err7_master.txt;impexp2a_master.txt;impexp2b_master.txt;SchemaOverrideAll2_master.txt;SchemaOverrideErrHigh_master.txt;SchemaOverrideErrLow_master.txt;SchemaOverrideErrNormal_master.txt;apply_schema_overrides3_master.txt;apply_schema_overrides_out1_master.txt;apply_schema_overrides_out2_master.txt;schemaGenConfig1_master.txt;apply_schema_overrides1_master.txt;apply_schema_overrides2_master.txt;temp_in.xml;config1_in.xml;schema_rb_nnyn_master.txt;..\..\Bin\Win32\Debug\RdbmsOverrides.dll;..\..\Bin\Win32\Debug\PostGISOverrides.dll;..\..\Bin\Win32\Debug\PostGISProvider.dll;$(FDOUTILITIES)\SchemaMgr\Bin\Win32\Debug\SmMessage.dll;OverrideBender.xslt"
 						Outputs="$(OutDir)\FakeInstall.ilk"
 					/>
 				</FileConfiguration>



More information about the fdo-commits mailing list