diff --git a/pgadmin/schema/pgSequence.cpp b/pgadmin/schema/pgSequence.cpp index 870cf2f..d30fe58 100644 --- a/pgadmin/schema/pgSequence.cpp +++ b/pgadmin/schema/pgSequence.cpp @@ -126,6 +126,7 @@ void pgSequence::UpdateValues() maxValue = sequence->GetLongLong(wxT("max_value")); cacheValue = sequence->GetLongLong(wxT("cache_value")); increment = sequence->GetLongLong(wxT("increment_by")); + nextValue = lastValue + increment; cycled = sequence->GetBool(wxT("is_cycled")); called = sequence->GetBool(wxT("is_called")); @@ -150,7 +151,7 @@ wxString pgSequence::GetSql(ctlTree *browser) if (GetCycled()) sql += wxT("\n CYCLE"); sql += wxT(";\n") - + GetOwnerSql(7, 3, wxT("TABLE ") + GetQuotedFullIdentifier()); + + GetOwnerSql(7, 3, wxT("SEQUENCE ") + GetQuotedFullIdentifier()); if (!GetConnection()->BackendMinimumVersion(8, 2)) sql += GetGrant(wxT("arwdRxt"), wxT("TABLE ") + GetQuotedFullIdentifier()); @@ -178,6 +179,7 @@ void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr properties->AppendItem(_("Owner"), GetOwner()); properties->AppendItem(_("ACL"), GetAcl()); properties->AppendItem(_("Current value"), GetLastValue()); + properties->AppendItem(_("Next value"), GetNextValue()); properties->AppendItem(_("Minimum"), GetMinValue()); properties->AppendItem(_("Maximum"), GetMaxValue()); properties->AppendItem(_("Increment"), GetIncrement());