Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-05 Thread Bruce Momjian
I don't think you can drop/recreate the sequence because the dependency code knows other tables depend on it. --- Rajesh Kumar Mallah. wrote: Doesn't dropping and recreating the sequence suit the bill ? whats' the

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Shridhar Daithankar
On 4 Dec 2002 at 20:41, Hannu Krosing wrote: hannu=# update seq set max_value = 99; ERROR: You can't change sequence relation seq hannu=# update pg_class set relkind = 'r' where relname = 'seq'; UPDATE 1 hannu=# update seq set max_value = 99; UPDATE 1 hannu=# update pg_class set relkind =

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Hannu Krosing
Shridhar Daithankar kirjutas K, 04.12.2002 kell 20:51: On 4 Dec 2002 at 20:41, Hannu Krosing wrote: hannu=# update seq set max_value = 99; ERROR: You can't change sequence relation seq hannu=# update pg_class set relkind = 'r' where relname = 'seq'; UPDATE 1 hannu=# update seq set

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Rod Taylor
On Wed, 2002-12-04 at 09:06, Oliver Elphick wrote: On Wed, 2002-12-04 at 12:29, raja kumar thatte wrote: Hai friends, I have a sequence called raj_seq with max value 3000. ... now i wanted to increase the max value of the raj_seq to 999. How to do this change? If i drop and

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Oliver Elphick
On Wed, 2002-12-04 at 12:29, raja kumar thatte wrote: Hai friends, I have a sequence called raj_seq with max value 3000. ... now i wanted to increase the max value of the raj_seq to 999. How to do this change? If i drop and recreate the raj_seq, then i have to recreate the table and all

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Hannu Krosing
Oliver Elphick kirjutas K, 04.12.2002 kell 19:06: On Wed, 2002-12-04 at 12:29, raja kumar thatte wrote: Hai friends, I have a sequence called raj_seq with max value 3000. ... now i wanted to increase the max value of the raj_seq to 999. How to do this change? If i drop and

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Dustin Sallings
Around 20:41 on Dec 4, 2002, Hannu Krosing said: What's wrong with this: dustin=# create sequence test_seq; CREATE SEQUENCE dustin=# select nextval('test_seq'); nextval - 1 (1 row) dustin=# select setval('test_seq', ); setval (1 row) dustin=#

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Joel Burton
On Wed, Dec 04, 2002 at 09:33:52AM -0800, Dustin Sallings wrote: Around 20:41 on Dec 4, 2002, Hannu Krosing said: What's wrong with this: dustin=# create sequence test_seq; CREATE SEQUENCE dustin=# select nextval('test_seq'); nextval - 1 (1 row) dustin=#

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Dustin Sallings
Around 12:44 on Dec 4, 2002, Joel Burton said: # The thread here is about how to raise the *max* value for the sequence, # not how to set the current value higher. The sequence in question was # created with a too-low maximum value (see help on CREATE SEQUENCE for # options); the user now wants

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Oliver Elphick
On Wed, 2002-12-04 at 17:33, Dustin Sallings wrote: What's wrong with this: dustin=# create sequence test_seq; CREATE SEQUENCE dustin=# select nextval('test_seq'); nextval - 1 (1 row) dustin=# select setval('test_seq', ); setval (1 row)

Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Bruce Momjian
Oliver Elphick wrote: On Wed, 2002-12-04 at 12:29, raja kumar thatte wrote: Hai friends, I have a sequence called raj_seq with max value 3000. ... now i wanted to increase the max value of the raj_seq to 999. How to do this change? If i drop and recreate the raj_seq, then i have