Hi,
I found a weird bug today. If you rename the public schema, it becomes
unavailable. Here is a patch to fix it. It modifies the query to use the oid
instead of the schema's name. Works great on Linux, should'nt be a problem on
win32.
Regards.
--
Guillaume.
<!-- http://abs.traduc.org/
http://lfs.traduc.org/
http://traduc.postgresqlfr.org/ -->
Index: src/schema/pgSchema.cpp
===================================================================
--- src/schema/pgSchema.cpp (révision 4798)
+++ src/schema/pgSchema.cpp (copie de travail)
@@ -164,7 +164,7 @@
pgSet *schemas = collection->GetDatabase()->ExecuteSet(
wxT("SELECT CASE WHEN nspname LIKE 'pg\\_temp\\_%%' THEN 1\n")
wxT(" WHEN (nsp.oid<") + NumToStr(collection->GetServer()->GetLastSystemOID()) +
- wxT(" OR nspname like 'pg\\_%') AND nspname != 'public' THEN 0\n")
+ wxT(" OR nspname like 'pg\\_%') AND nsp.oid != 2200 THEN 0\n")
wxT(" ELSE 3 END AS nsptyp,\n")
wxT(" nsp.nspname, nsp.oid, pg_get_userbyid(nspowner) AS namespaceowner, nspacl, description,")
wxT(" has_schema_privilege(nsp.oid, 'CREATE') as cancreate\n")
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend