sequence rename?

Поиск
Список
Период
Сортировка
От ben f
Тема sequence rename?
Дата
Msg-id 20041001201738.58198.qmail@web41511.mail.yahoo.com
обсуждение исходный текст
Ответы Re: sequence rename?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
So I am renaming a table, and the last stumbling block
that I've met is the associated sequence.  I tried the
commands suggested @

http://mailman.fastxs.net/pipermail/dbmail-dev/2004-August/004307.html

ie:

CREATE SEQUENCE $newseq
SELECT setval('$newseq', max($column)) FROM $table
ALTER TABLE $table ALTER COLUMN $column SET DEFAULT
nextval('$newseq'::text)
DROP SEQUENCE $oldseq

but when trying to perform the DROP SEQUENCE (psql), i
get a message like:

ERROR:  Cannot drop sequence $oldseq because table
$table column $column requires it
You may drop table $table column $column instead


After that, I tried the query suggested here:

http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x14316%2ehtm#REMOVINGASEQUENCE
(example 7-34)

And it came back empty.

What am I doing wrong?  when i \d $table, it shows no
such dependency.  Is there another way to pull this
off?

thanks

ben

ps -- please cc responses directly to me, since i'm
not a subscriber.



_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com

В списке pgsql-general по дате отправления:

Предыдущее
От: "Arnau Rebassa"
Дата:
Сообщение: Random not so random
Следующее
От: dperiwal@softwaretree.com (Damodar Periwal)
Дата:
Сообщение: See the good, the bad, and the ugly of your Postgres data with OneClickRevelation(tm)