Migration with PostgreSQL - function nextval does not exist

This might be a problem with postgresql, but I’m not sure. In a
migration I have renamed a table so I wanted to rename a sequencer as
well. It looks like:

execute “ALTER TABLE global_vacations_id_seq RENAME TO
vacations_id_seq;”
execute “ALTER TABLE vacations ALTER COLUMN id SET DEFAULT
nextval(‘vacations_id_seq’::regclass);”

But the process of migration has reported error:
PGError: ERROR: function nextval(regclass) does not exist

Funny part is that running “rake migrate” once again didn’t give this
error again. It also has crashed, but because of errors from having the
migration already ran only on half of file. Anyone has experienced
something like this?


Kamil

postgresql before 8.1 does not have function nextval(regclass),
but nextval( text).