Making serial survive pg_dump
От | Rod Taylor |
---|---|
Тема | Making serial survive pg_dump |
Дата | |
Msg-id | 062a01c212d3$3f21e2e0$fe01a8c0@jester обсуждение исходный текст |
Ответы |
Re: Making serial survive pg_dump
Re: Making serial survive pg_dump |
Список | pgsql-hackers |
Currently serial is dumped as a sequence and appropriate default statement. With my upcoming dependency patch serials depend on the appropriate column. Drop the column (or table) and the sequence goes with it. The depencency information does not survive the pg_dump / restore process however as it's recreated as the table and individual sequence. I see 2 options for carrying the information. Store sequence information in the SERIAL creation statement: CREATE TABLE tab (col1 SERIAL(<start num>, <sequence name>)); Or store the dependency information in the sequence: CREATE SEQUENCE ... REQUIRES COLUMN <column>; The former makes a lot more sense, and it's nice that the sequence information is in one place. -- Rod
В списке pgsql-hackers по дате отправления: