Skip to content

Instantly share code, notes, and snippets.

@choplin
Last active December 25, 2015 06:09
Show Gist options
  • Select an option

  • Save choplin/6930490 to your computer and use it in GitHub Desktop.

Select an option

Save choplin/6930490 to your computer and use it in GitHub Desktop.
-- 準備
psql1 $ create table foo(v text);
psql1 $ create table tmp(v text);
psql1 $ insert into foo values ('foo');
psql1 $ insert into tmp values ('tmp');
-- rename: tmp -> foo
psql1 $ begin;
psql2 $ begin;
psql1 $ drop table foo;
psql2 $ select * from foo;
psql1 $ alter table tmp rename to foo;
psql1 $ commit;
-- 9.1
ERROR: could not open relation with OID 16390
-- 9.2
v
-----
tmp
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment