SVN Commit by andreas: r4710 - in trunk/pgadmin3: . src/dlg src/include/base - Mailing list pgadmin-hackers
From | svn@pgadmin.org |
---|---|
Subject | SVN Commit by andreas: r4710 - in trunk/pgadmin3: . src/dlg src/include/base |
Date | |
Msg-id | 200511091134.jA9BYspR024743@developer.pgadmin.org Whole thread Raw |
List | pgadmin-hackers |
Author: andreas Date: 2005-11-09 11:34:53 +0000 (Wed, 09 Nov 2005) New Revision: 4710 Modified: trunk/pgadmin3/CHANGELOG.txt trunk/pgadmin3/src/dlg/dlgColumn.cpp trunk/pgadmin3/src/dlg/dlgProperty.cpp trunk/pgadmin3/src/include/base/pgDefs.h Log: Allow all 8.x column changes Modified: trunk/pgadmin3/CHANGELOG.txt =================================================================== --- trunk/pgadmin3/CHANGELOG.txt 2005-11-09 11:15:41 UTC (rev 4709) +++ trunk/pgadmin3/CHANGELOG.txt 2005-11-09 11:34:53 UTC (rev 4710) @@ -17,7 +17,8 @@ </ul> <br> <ul> - <li>2005-11-09 DP 1.4 Add search/replace to the query editor + <li>2005-11-09 AP 1.4.1 Allow all 8.x column changes (r: Chris Velevitch) + <li>2005-11-09 DP Add search/replace to the query editor <li>2005-11-09 AP 1.4.1 Fix param name quoting for procedures (r: Alex Tyagloff) <li>2005-11-04 AP 1.4.0 Fix SET role (r:Florian Pflug), fix role help <li>2005-11-04 DP 1.4.0 Fix role inheritance option when creating roles, per Mike Allen Modified: trunk/pgadmin3/src/dlg/dlgColumn.cpp =================================================================== --- trunk/pgadmin3/src/dlg/dlgColumn.cpp 2005-11-09 11:15:41 UTC (rev 4709) +++ trunk/pgadmin3/src/dlg/dlgColumn.cpp 2005-11-09 11:34:53 UTC (rev 4710) @@ -85,20 +85,25 @@ if (!column->IsReferenced()) { - pgSet *set=connection->ExecuteSet( + wxString typeSql= wxT("SELECT tt.oid, tt.typname\n") wxT(" FROM pg_cast\n") wxT(" JOIN pg_type tt ON tt.oid=casttarget\n") - wxT(" WHERE castsource=") + NumToStr(column->GetAttTypId()) + wxT("\n") - wxT(" AND castfunc=0")); + wxT(" WHERE castsource=") + NumToStr(column->GetAttTypId()) + wxT("\n"); - if (set) + if (connection->BackendMinimumVersion(8, 0)) + typeSql += wxT(" AND castcontext IN ('i', 'a')"); + else + typeSql += wxT(" AND castfunc=0"); + + pgSetIterator set(connection, typeSql); + + while (set.RowsLeft()) { - while (!set->Eof()) + if (set.GetVal(wxT("typname")) != column->GetRawTypename()) { - cbDatatype->Append(set->GetVal(wxT("typname"))); - AddType(wxT("?"), set->GetOid(wxT("oid")), set->GetVal(wxT("typname"))); - set->MoveNext(); + cbDatatype->Append(set.GetVal(wxT("typname"))); + AddType(wxT("?"), set.GetOid(wxT("oid")), set.GetVal(wxT("typname"))); } } } Modified: trunk/pgadmin3/src/dlg/dlgProperty.cpp =================================================================== --- trunk/pgadmin3/src/dlg/dlgProperty.cpp 2005-11-09 11:15:41 UTC (rev 4709) +++ trunk/pgadmin3/src/dlg/dlgProperty.cpp 2005-11-09 11:34:53 UTC (rev 4710) @@ -841,6 +841,8 @@ case PGOID_TYPE_BIT_ARRAY: case PGOID_TYPE_CHAR: case PGOID_TYPE_CHAR_ARRAY: + case PGOID_TYPE_BPCHAR: + case PGOID_TYPE_BPCHAR_ARRAY: case PGOID_TYPE_VARCHAR: case PGOID_TYPE_VARCHAR_ARRAY: vartyp=wxT("L"); Modified: trunk/pgadmin3/src/include/base/pgDefs.h =================================================================== --- trunk/pgadmin3/src/include/base/pgDefs.h 2005-11-09 11:15:41 UTC (rev 4709) +++ trunk/pgadmin3/src/include/base/pgDefs.h 2005-11-09 11:34:53 UTC (rev 4710) @@ -36,7 +36,9 @@ #define PGOID_TYPE_FLOAT8 701L #define PGOID_TYPE_MONEY 790L #define PGOID_TYPE_CHAR_ARRAY 1002L +#define PGOID_TYPE_BPCHAR_ARRAY 1014L #define PGOID_TYPE_VARCHAR_ARRAY 1015L +#define PGOID_TYPE_BPCHAR 1042L #define PGOID_TYPE_VARCHAR 1043L #define PGOID_TYPE_TIME 1083L #define PGOID_TYPE_TIMESTAMP 1114L
pgadmin-hackers by date: