在尝试将Craig Ringer的PostgreSQL gapless sequences示例移到另一个架构'test'
时,我收到了错误消息。查询
INSERT INTO test.dummy(id, blah)
VALUES ( test.get_next_id('test.thetable_id_counter','last_id'), 42 );
错误
relation "test.thetable_id_counter" does not exist
UPDATE "test.thetable_id_counter" SET "test.last_id" = "test...
^
但查询:
SELECT to_regclass('test.thetable_id_counter');
不会导致NULL。