闪回查询简介 本页为您介绍闪回查询的语法。 指用户能够指定某个过去的时间点,以便检索出该时间点时某个表的历史数据。语法: plaintext SELECT col1 type1, col2 type2,... 需查询表的系统字段以及目标字段 FROM pgdirtyread('schema.tablename') AS t(tableoid oid, ctid tid, xmin xid, xmax xid, cmin cid, cmax cid, dead boolean, 系统字段 col1 typei, col2 typei+1,...) 目标字段 where ( pgxactcommittimestamp(xmin) < '$ts' and (pgxactcommittimestamp(case xmax when 0 then null else xmax end) < '$ts') is distinct from true) ; schema.tablename:表名 $ts:查询某个表在ts这个时间点时的数据,ts指一个具体的历史时间。