postgresql 临时表 全局访问

create TEMPORARY table tmp (ip varchar(20) ,users varchar(50));
insert into tmp (ip,users) values('10.211.55.6','studio');

--获取临时表名称
select schemaname from pg_tables where tablename = 'tmp'
//注意临时表写入数据后 其它session就无法访问该临时表了
select * from pg_temp_15.tmp

猜你喜欢

转载自blog.csdn.net/ozhy111/article/details/81939350