diff --git a/dlg/dlgSearchObject.cpp b/dlg/dlgSearchObject.cpp index 59d5de2..42cb2a9 100644 --- a/dlg/dlgSearchObject.cpp +++ b/dlg/dlgSearchObject.cpp @@ -556,7 +556,7 @@ void dlgSearchObject::OnSearch(wxCommandEvent &ev) wxT("inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r','v','m') ") wxT("left join pg_namespace n on t.relnamespace = n.oid ") wxT("where a.attnum > 0 ") - wxT(" and (ty.typname ilike ") + txtPatternStr + wxT(" or pg_get_expr(ad.adbin,0) ilike ") + txtPatternStr + wxT(") ") + wxT(" and (ty.typname ilike ") + txtPatternStr + wxT(" or pg_get_expr(ad.adbin,ad.adrelid) ilike ") + txtPatternStr + wxT(") ") wxT("UNION ") // View's definition wxT("SELECT 'Views', c.relname, ") wxT("':Schemas/' || n.nspname || '/:Views/' || c.relname, n.nspname ") diff --git a/frm/frmEditGrid.cpp b/frm/frmEditGrid.cpp index ee210d5..81767bf 100644 --- a/frm/frmEditGrid.cpp +++ b/frm/frmEditGrid.cpp @@ -2328,7 +2328,7 @@ sqlTable::sqlTable(pgConn *conn, pgQueryThread *_thread, const wxString &tabName pgSet *colSet = connection->ExecuteSet( wxT("SELECT n.nspname AS nspname, relname, format_type(t.oid,NULL) AS typname, format_type(t.oid, att.atttypmod) AS displaytypname, ") - wxT("nt.nspname AS typnspname, attname, attnum, COALESCE(b.oid, t.oid) AS basetype, atthasdef, pg_get_expr(def.adbin,0) AS adsrc,\n") + wxT("nt.nspname AS typnspname, attname, attnum, COALESCE(b.oid, t.oid) AS basetype, atthasdef, pg_get_expr(def.adbin,def.adrelid) AS 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") diff --git a/frm/frmRestore.cpp b/frm/frmRestore.cpp index 769c273..534382f 100644 --- a/frm/frmRestore.cpp +++ b/frm/frmRestore.cpp @@ -848,7 +848,7 @@ void frmRestore::OnEndProcess(wxProcessEvent &ev) } else { - wxRemoveFile(restoreTOCFilename); + if (!restoreTOCFilename.IsEmpty()) wxRemoveFile(restoreTOCFilename); } } diff --git a/schema/pgObject.cpp b/schema/pgObject.cpp index 109086f..0407609 100644 --- a/schema/pgObject.cpp +++ b/schema/pgObject.cpp @@ -664,7 +664,7 @@ void pgObject::ShowDependencies(frmMain *form, ctlListView *Dependencies, const * END */ ShowDependency(GetDatabase(), Dependencies, - wxT("SELECT DISTINCT dep.deptype, dep.refclassid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin,0) adsrc, \n") + wxT("SELECT DISTINCT dep.deptype, dep.refclassid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin,ad.adrelid) adsrc, \n") wxT(" CASE WHEN cl.relkind IS NOT NULL THEN cl.relkind::text || COALESCE(dep.refobjsubid::text, '')\n") wxT(" WHEN tg.oid IS NOT NULL THEN 'T'::text\n") wxT(" WHEN ty.oid IS NOT NULL THEN 'y'::text\n") @@ -837,7 +837,7 @@ void pgObject::ShowDependents(frmMain* form, ctlListView* referencedBy, const wx * END */ ShowDependency(GetDatabase(), referencedBy, - wxT("SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin,0) adsrc, \n") + wxT("SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin,ad.adrelid) adsrc, \n") wxT(" CASE WHEN cl.relkind IS NOT NULL THEN cl.relkind::text || COALESCE(dep.objsubid::text, '')\n") wxT(" WHEN tg.oid IS NOT NULL THEN 'T'::text\n") wxT(" WHEN ty.oid IS NOT NULL THEN 'y'::text\n") diff --git a/x64/Release_(3.0)/pgAdmin3.exe b/x64/Release_(3.0)/pgAdmin3.exe index f065de1..9b156b5 100644 Binary files a/x64/Release_(3.0)/pgAdmin3.exe and b/x64/Release_(3.0)/pgAdmin3.exe differ