From: Olivier Baheux on 7 Apr 2010 08:47 i'm trying to find where are stored sequence definition (increment,minvalue,maxvalue,start,cache) in system tables. Atm I found everything exept sequence. Thanks in advance.
From: Nicolas Barbier on 7 Apr 2010 11:44 2010/4/7 Olivier Baheux <olivierbaheux(a)gmail.com>: > i'm trying to find where are stored sequence definition > (increment,minvalue,maxvalue,start,cache) in system tables. Atm I > found everything exept sequence. It's in the sequence itself (which can be accessed like a table). The fact that this "table" is in fact a sequence is stored in pg_class: --------8<-------- itsme=# CREATE TABLE a (i serial); HINWEIS: CREATE TABLE erstellt implizit eine Sequenz »a_i_seq« für die »serial«-Spalte »a.i« CREATE TABLE itsme=# SELECT * FROM a_i_seq; sequence_name | last_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called ---------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+----------- a_i_seq | 1 | 1 | 9223372036854775807 | 1 | 1 | 1 | f | f (1 Zeile) itsme=# SELECT relkind FROM pg_class WHERE relname = 'a_i_seq'; relkind --------- S (1 Zeile) -------->8-------- Nicolas -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Olivier Baheux on 8 Apr 2010 02:36 On 7 avr, 17:44, nicolas.barb...(a)gmail.com (Nicolas Barbier) wrote: > 2010/4/7 Olivier Baheux <olivierbah...(a)gmail.com>: > > > i'm trying to find where are stored sequence definition > > (increment,minvalue,maxvalue,start,cache) in system tables. Atm I > > found everything exept sequence. > > It's in the sequence itself (which can be accessed like a table). The > fact that this "table" is in fact a sequence is stored in pg_class: > > --------8<-------- > itsme=# CREATE TABLE a (i serial); > HINWEIS: CREATE TABLE erstellt implizit eine Sequenz »a_i_seq« für > die »serial«-Spalte »a.i« > CREATE TABLE > itsme=# SELECT * FROM a_i_seq; > sequence_name | last_value | increment_by | max_value | > min_value | cache_value | log_cnt | is_cycled | is_called > ---------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+----------- > a_i_seq | 1 | 1 | 9223372036854775807 | > 1 | 1 | 1 | f | f > (1 Zeile) > > itsme=# SELECT relkind FROM pg_class WHERE relname = 'a_i_seq'; > relkind > --------- > S > (1 Zeile) > -------->8-------- > > Nicolas > > -- > Sent via pgsql-hackers mailing list (pgsql-hack...(a)postgresql.org) > To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-hackers it work, thanx so much
|
Pages: 1 Prev: FREE HELP DESK SOFTWARE Next: Thoughts on pg_hba.conf rejection |