renaming sequences
От | Matthew Hixson |
---|---|
Тема | renaming sequences |
Дата | |
Msg-id | 0068D10E-10EE-11D9-BF0E-000A95D05926@poindextrose.org обсуждение исходный текст |
Список | pgsql-general |
I had a bunch of tables that had v_ prepended to their names. I've renamed all of the tables so that they don't have that prefix anymore so that v_address is now addresses. The name of this table's sequence is still v_addresses_address_id_seq. This is fine except for the fact that I'm using JBoss and it assumes that the table's sequence is addresses_address_id_seq. (Why it needs to read the sequence I have no idea.) So now, every time I try to save an object JBoss is executing sql that is trying to read from a non-existent sequence. Can I rename my sequences and change the tables to point to the new sequence names or do I have to do something like: 1) Rename addresses to addresses_temp 2) Create addresses from scratch so that Postgres creates a sequence named addresses_address_id_seq 3) Select all of the data from addresses_temp into addresses. Thanks, -M@
В списке pgsql-general по дате отправления: