Commits

Tuukka Norri committed 75a5f06

Bug fixes
- Tables with identical names in different schemas should now work (fixes #32).
- Also fixed a memory leak (fixes #33).

  • Participants
  • Parent commits a16f3e9
  • Branches PGTS

Comments (0)

Files changed (2)

File Framework/Sources/PGTSAdditions.m

             else
                 [dict setObject: class forKey: key];
         }
+
+        initialized = YES;
     }
     return dict;
 }

File Framework/Sources/PGTSDatabaseInfo.m

         NSString* queryString = 
         @"SELECT c.oid AS oid, c.relnamespace AS schemaoid, c.relacl, c.relowner, c.relkind, r.rolname "
         " FROM pg_class c, pg_namespace n, pg_roles r "
-        " WHERE c.relowner = r.oid AND c.relname = $1 AND n.nspname = $2";
+        " WHERE c.relowner = r.oid AND c.relnamespace = n.oid AND c.relname = $1 AND n.nspname = $2";
         PGTSResultSet* res = [connection executeQuery: queryString parameters: tableName, schemaName];
         if (0 < [res countOfRows])
         {