Re: [HACKERS] Sequences....
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] Sequences.... |
Дата | |
Msg-id | 14967.921555947@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Sequences.... (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
BTW, has anyone thought twice about the interaction of SERIAL columns with inheritance? If I create a table having a SERIAL column and then create a child table that inherits from the first, what happens? Does the child share the use of the parent's sequence (implying that serial number assignments are unique across the parent and all its children)? Or does the child get a new sequence object of its very own --- and if so, what does that sequence object start out at? We ought to find out what the current code actually does and then think about whether we like it or not; I'll bet that the current behavior was not designed but just fell out of the implementation. If we do want shared use of a parent's sequence, that's going to complicate Ryan's new system table considerably --- probably it needs to have a row for each table using a particular sequence-created-to- implement-SERIAL, and the sequence object can be deleted only when the last reference to it goes away. Life may become even more interesting for pg_dump, too. regards, tom lane
В списке pgsql-hackers по дате отправления: