Index: configure.ac
===================================================================
RCS file: /projects/pgadmin3/configure.ac,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lconfigure.ac -Lconfigure.ac -u -w -r1.30 -r1.31
--- configure.ac
+++ configure.ac
@@ -1,7 +1,7 @@
AC_PREREQ(2.57)
AC_REVISION($Revision$)
AC_COPYRIGHT(Copyright 2002 - 2004 The pgAdmin Development Team)
-AC_INIT(pgadmin3, 1.2.0rc2, pgadmin-support@postgresql.org)
+AC_INIT(pgadmin3, 1.2.0post-rc2, pgadmin-support@postgresql.org)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR([src/pgAdmin3.cpp])
AM_CONFIG_HEADER([config.h])
Index: CHANGELOG.txt
===================================================================
RCS file: /projects/pgadmin3/CHANGELOG.txt,v
retrieving revision 1.167
retrieving revision 1.168
diff -LCHANGELOG.txt -LCHANGELOG.txt -u -w -r1.167 -r1.168
--- CHANGELOG.txt
+++ CHANGELOG.txt
@@ -17,6 +17,7 @@
+ - 2004-11-18 AP 1.2RC3 fix missing schema in EditGrid (r: Martin Susil)
- 2004-11-16 AP 1.2RC3 fix pg_dump option
- 2004-11-10 AP 1.2RC2 Remove tablespace from schema (pgsql post-beta4 change)
- 2004-11-10 AP 1.2RC2 Fix properties for multiply inherited tables (r: Riccardo G. Facchini)
Index: frmEditGrid.h
===================================================================
RCS file: /projects/pgadmin3/src/include/frmEditGrid.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/include/frmEditGrid.h -Lsrc/include/frmEditGrid.h -u -w -r1.19 -r1.20
--- src/include/frmEditGrid.h
+++ src/include/frmEditGrid.h
@@ -59,7 +59,7 @@
wxString Quote(const wxString &value);
OID type;
long typlen, typmod;
- wxString name, typeName;
+ wxString name, typeName, typeNspName;
bool numeric, isPrimaryKey, needResize;
};
Index: version.h
===================================================================
RCS file: /projects/pgadmin3/src/include/version.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/include/version.h -Lsrc/include/version.h -u -w -r1.17 -r1.18
--- src/include/version.h
+++ src/include/version.h
@@ -11,9 +11,9 @@
// Application Versions
-#define VERSION_STR wxT("1.2.0 RC2")
+#define VERSION_STR wxT("1.2.0 Post-RC2")
#define VERSION_NUM 1,2,0,99
-#define VERSION_PACKAGE 1.2.0rc2
+#define VERSION_PACKAGE 1.2.0post-rc2
#define PRERELEASE 1
// #define BUILD "..."
Index: frmEditGrid.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/frmEditGrid.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -Lsrc/ui/frmEditGrid.cpp -Lsrc/ui/frmEditGrid.cpp -u -w -r1.62 -r1.63
--- src/ui/frmEditGrid.cpp
+++ src/ui/frmEditGrid.cpp
@@ -1153,11 +1153,13 @@
pgSet *colSet=connection->ExecuteSet(
- wxT("SELECT nspname, relname, t.typname, attname, COALESCE(b.oid, t.oid) AS basetype, atthasdef, adsrc,\n")
+ wxT("SELECT n.nspname AS nspname, relname, t.typname, nt.nspname AS typnspname, ")
+ wxT("attname, COALESCE(b.oid, t.oid) AS basetype, atthasdef, adsrc,\n")
wxT(" CASE WHEN t.typbasetype::oid=0 THEN att.atttypmod else t.typtypmod END AS typmod,\n")
wxT(" CASE WHEN t.typbasetype::oid=0 THEN att.attlen else t.typlen END AS typlen\n")
wxT(" FROM pg_attribute att\n")
wxT(" JOIN pg_type t ON t.oid=att.atttypid\n")
+ wxT(" JOIN pg_namespace nt ON nt.oid=t.typnamespace\n")
wxT(" JOIN pg_class c ON c.oid=attrelid\n")
wxT(" JOIN pg_namespace n ON n.oid=relnamespace\n")
wxT(" LEFT OUTER JOIN pg_type b ON b.oid=t.typbasetype\n")
@@ -1184,6 +1186,7 @@
columns[i].name = colSet->GetVal(wxT("attname"));
columns[i].typeName = colSet->GetVal(wxT("typname"));
+ columns[i].typeNspName = colSet->GetVal(wxT("typnspname"));
columns[i].type = (Oid)colSet->GetOid(wxT("basetype"));
if ((columns[i].type == PGOID_TYPE_INT4 || columns[i].type == PGOID_TYPE_INT8)
@@ -1288,6 +1291,9 @@
}
else
{
+ // um, we never should reach here because this would mean
+ // that datatypes are unreadable.
+ // *if* we reach here, namespace info is missing.
for (i=0 ; i < nCols ; i++)
{
columns[i].typeName = thread->DataSet()->ColType(i);
@@ -1464,7 +1470,8 @@
if (!where.IsEmpty())
where += wxT(" AND ");
where += qtIdent(columns[cn-1].name) + wxT(" = ")
- + qtString(colval) + wxT("::") + qtIdent(columns[cn-1].typeName);
+ + qtString(colval) + wxT("::") + qtIdent(columns[cn-1].typeNspName)
+ + wxT(".") + qtIdent(columns[cn-1].typeName);
}
}
return where;
@@ -1846,7 +1853,7 @@
else
str=qtString(value);
- return str + wxT("::") + typeName;
+ return str + wxT("::") + qtIdent(typeNspName) + wxT(".") + qtIdent(typeName);
}