Corrected case to get columns from Regions table from PostgreSQL http://opensimulator.org/mantis/view.php?id=6865

Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
master-beforevarregion
Fernando Oliveira 2013-11-25 21:20:56 -02:00 committed by Michael Cerquoni
parent 60e049ea39
commit 0ad45531a1
1 changed files with 2 additions and 2 deletions

View File

@ -206,7 +206,7 @@ namespace OpenSim.Data.PGSQL
DataTable schemaTable = result.GetSchemaTable(); DataTable schemaTable = result.GetSchemaTable();
foreach (DataRow row in schemaTable.Rows) foreach (DataRow row in schemaTable.Rows)
m_ColumnNames.Add(row["ColumnName"].ToString()); m_ColumnNames.Add(row["column_name"].ToString());
} }
foreach (string s in m_ColumnNames) foreach (string s in m_ColumnNames)
@ -376,7 +376,7 @@ namespace OpenSim.Data.PGSQL
private List<RegionData> Get(int regionFlags, UUID scopeID) private List<RegionData> Get(int regionFlags, UUID scopeID)
{ {
string sql = "SELECT * FROM " + m_Realm + " WHERE (flags & " + regionFlags.ToString() + ") <> 0"; string sql = "SELECT * FROM " + m_Realm + " WHERE (\"flags\" & " + regionFlags.ToString() + ") <> 0";
if (scopeID != UUID.Zero) if (scopeID != UUID.Zero)
sql += " AND \"ScopeID\" = :scopeID"; sql += " AND \"ScopeID\" = :scopeID";