Re: system table storing sequence attributes
От | A. Kretschmer |
---|---|
Тема | Re: system table storing sequence attributes |
Дата | |
Msg-id | 20070522123804.GH32759@a-kretschmer.de обсуждение исходный текст |
Ответ на | Re: system table storing sequence attributes ("Sabin Coanda" <sabin.coanda@deuromedia.ro>) |
Список | pgsql-sql |
am Tue, dem 22.05.2007, um 15:23:44 +0300 mailte Sabin Coanda folgendes: > ... > > select last_value from sequence_name > > Unfortunately there is the same problem. The documentation say: "It is an > error to call lastval if nextval has not yet been called in the current > session." .... and I don't want to call nextval before. No, you can select last_value from a sequence. Welcome to psql 8.1.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g orterminate with semicolon to execute query \q to quit test=# select last_value from t2_seq;last_value ------------ 3 (1 row) Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
В списке pgsql-sql по дате отправления: