Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Is this a bug? ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 15495 of 16112
Post > Topic >>

Is this a bug? (changing sequences in default value)

by fschapachnik@[EMAIL PROTECTED] (Fernando Schapachnik) May 8, 2008 at 08:52 AM

Pg 8.1.11, I try to change sequences as default value of a table, then 
remove old sequence:

# \d table1
                               Table "table1"
 Column |  Type   |                           Modifiers
--------+---------+---------------------------------------------------------------
 id     | integer | not null default nextval('table1_id_seq'::regclass)
 nombre | text    | not null
Indexes:
    "table1_pkey" PRIMARY KEY, btree (id)

# ALTER TABLE table1 alter column id set default nextval('newseq_id_seq');
ALTER TABLE

# \d table1
                               Table "table1"
 Column |  Type   |                           Modifiers
--------+---------+---------------------------------------------------------------
 id     | integer | not null default nextval('newseq_id_seq'::regclass)
 nombre | text    | not null
Indexes:
    "table1_pkey" PRIMARY KEY, btree (id)

# drop SEQUENCE table1_id_seq ;
ERROR:  cannot drop sequence table1_id_seq because table 
table1 column id requires it
HINT:  You may drop table table1 column id instead.

Am I doing something wrong?

Thanks!

Fernando.

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 7 Posts in Topic:
Is this a bug? (changing sequences in default value)
fschapachnik@[EMAIL PROTE  2008-05-08 08:52:07 
Re: Is this a bug? (changing sequences in default value)
mmoncure@[EMAIL PROTECTED  2008-05-09 08:45:19 
Re: Is this a bug? (changing sequences in default value)
fernando@[EMAIL PROTECTED  2008-05-09 09:55:02 
Re: Is this a bug? (changing sequences in default value)
mmoncure@[EMAIL PROTECTED  2008-05-09 09:48:07 
Re: Is this a bug? (changing sequences in default value)
fernando@[EMAIL PROTECTED  2008-05-13 09:50:27 
Re: Is this a bug? (changing sequences in default value)
mmoncure@[EMAIL PROTECTED  2008-05-13 11:26:52 
Re: Is this a bug? (changing sequences in default value)
fernando@[EMAIL PROTECTED  2008-05-13 13:16:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 20 4:29:28 CDT 2008.