Log Message:
-----------
owner related fixes
Modified Files:
--------------
pgadmin3/src/ui:
dlgDomain.cpp (r1.24 -> r1.25)
dlgSequence.cpp (r1.25 -> r1.26)
Index: dlgSequence.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/dlgSequence.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/ui/dlgSequence.cpp -Lsrc/ui/dlgSequence.cpp -u -w -r1.25 -r1.26
--- src/ui/dlgSequence.cpp
+++ src/ui/dlgSequence.cpp
@@ -157,7 +157,11 @@
sql += wxT("ALTER TABLE ") + sequence->GetQuotedFullIdentifier()
+ wxT(" RENAME TO ") + qtIdent(name) + wxT(";\n");
}
- AppendOwnerChange(sql);
+ if (sequence->GetOwner() != cbOwner->GetValue())
+ {
+ sql += wxT("ALTER TABLE ") + sequence->GetQuotedFullIdentifier()
+ + wxT(" OWNER TO ") + qtIdent(name) + wxT(";\n");
+ }
if (connection->BackendMinimumVersion(7, 4))
{
Index: dlgDomain.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/dlgDomain.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/ui/dlgDomain.cpp -Lsrc/ui/dlgDomain.cpp -u -w -r1.24 -r1.25
--- src/ui/dlgDomain.cpp
+++ src/ui/dlgDomain.cpp
@@ -196,12 +196,7 @@
sql += wxT("\n CHECK (") + txtCheck->GetValue() + wxT(")");
sql += wxT(";\n");
- if (cbOwner->GetGuessedSelection() > 0)
- {
- sql += wxT("ALTER DOMAIN ") + domain->GetQuotedFullIdentifier()
- + wxT(" USER TO ") + qtIdent(cbOwner->GetValue())
- + wxT(";\n");
- }
+ AppendOwnerNew(sql, wxT("DOMAIN ") + qtIdent(name));
}
AppendComment(sql, wxT("DOMAIN"), schema, domain);
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster