~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to pgadmin/schema/pgSequence.cpp

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2013-09-10 16:16:38 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20130910161638-wwup1q553ylww7dr
Tags: 1.18.0-1
* New upstream release.
* Don't install /usr/bin/png2c anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
4
//
5
 
// Copyright (C) 2002 - 2012, The pgAdmin Development Team
 
5
// Copyright (C) 2002 - 2013, The pgAdmin Development Team
6
6
// This software is released under the PostgreSQL Licence
7
7
//
8
8
// pgSequence.cpp - Sequence class
128
128
                increment = sequence->GetLongLong(wxT("increment_by"));
129
129
                cycled = sequence->GetBool(wxT("is_cycled"));
130
130
                called = sequence->GetBool(wxT("is_called"));
 
131
                if (called)
 
132
                        nextValue = lastValue + increment;
 
133
                else
 
134
                        nextValue = lastValue;
131
135
 
132
136
                delete sequence;
133
137
        }
178
182
                properties->AppendItem(_("Owner"), GetOwner());
179
183
                properties->AppendItem(_("ACL"), GetAcl());
180
184
                properties->AppendItem(_("Current value"), GetLastValue());
 
185
                properties->AppendItem(_("Next value"), GetNextValue());
181
186
                properties->AppendItem(_("Minimum"), GetMinValue());
182
187
                properties->AppendItem(_("Maximum"), GetMaxValue());
183
188
                properties->AppendItem(_("Increment"), GetIncrement());
285
290
                sql += wxT(",\n(SELECT array_agg(provider) FROM pg_seclabels sl2 WHERE sl2.objoid=cl.oid) AS providers");
286
291
        }
287
292
        sql += wxT("\n  FROM pg_class cl\n")
288
 
               wxT("  LEFT OUTER JOIN pg_description des ON des.objoid=cl.oid\n")
 
293
               wxT("  LEFT OUTER JOIN pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)\n")
289
294
               wxT(" WHERE relkind = 'S' AND relnamespace  = ") + collection->GetSchema()->GetOidStr()
290
295
               + restriction + wxT("\n")
291
296
               wxT(" ORDER BY relname");