Index: dlgColumn.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/dlgColumn.cpp,v retrieving revision 1.37.2.1 retrieving revision 1.37.2.2 diff -Lsrc/ui/dlgColumn.cpp -Lsrc/ui/dlgColumn.cpp -u -w -r1.37.2.1 -r1.37.2.2 --- src/ui/dlgColumn.cpp +++ src/ui/dlgColumn.cpp @@ -293,14 +293,9 @@ + wxT(" ") + typname + wxT(";\n") + wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier() + wxT("\n ALTER COLUMN ") + qtIdent(name) - + wxT(" SET NOT NULL;\n") - + wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier() - + wxT("\n ALTER COLUMN ") + qtIdent(name) - + wxT(" SET DEFAULT nextval('") + sequence + wxT("'::text);\n"); + + wxT(" SET DEFAULT nextval('") + sequence + wxT("'::text);\n") - if (newSequence) - { - sql += wxT("INSERT INTO pg_depend(classid, objid, objsubid, refclassid, refobjid, refobjsubid, deptype)\n") + wxT("INSERT INTO pg_depend(classid, objid, objsubid, refclassid, refobjid, refobjsubid, deptype)\n") wxT("SELECT cl.oid, seq.oid, 0, cl.oid, ") + table->GetOidStr() + wxT(", attnum, 'i'\n") wxT(" FROM pg_class cl, pg_attribute, pg_class seq\n") wxT(" JOIN pg_namespace sn ON sn.OID=seq.relnamespace\n") @@ -309,7 +304,6 @@ wxT(" AND sn.nspname=") + qtString(table->GetSchema()->GetName()) + wxT("\n") wxT(" AND attrelid=") + table->GetOidStr() + wxT(" AND attname=") + qtString(name) + wxT(";\n"); } - } else { sql = wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier()