Move sequences' metadata fields into a new pg_sequence system catalog (Peter Eisentraut)
A sequence relation now stores only the fields that can be modified by nextval(), that is last_value, log_cnt, and is_called. Other sequence properties, such as the starting value and increment, are kept in a corresponding row of the pg_sequence catalog. ALTER SEQUENCE updates are now fully transactional, implying that the sequence is locked until commit. The nextval() and setval() functions remain nontransactional.
The main incompatibility introduced by this change is that selecting from a sequence relation now returns only the three fields named above. To obtain the sequence's other properties, applications must look into pg_sequence. The new system view pg_sequences can also be used for this purpose; it provides column names that are more compatible with existing code.
The output of psql's \d command for a sequence has been redesigned, too.

PostgreSQL 10 对序列进行了重大改进,将元数据字段移入新的 pg_sequence 系统目录中,使 ALTER SEQUENCE 操作完全具备事务性,并重新设计了 psql 的 d 命令输出。
787

被折叠的 条评论
为什么被折叠?



