创建一个预备
最近更新时间: 2025-10-11 18:10:00
创建一个预备
postgres=# create table t1(f1 int,f2 int);
CREATE TABLE
postgres=# insert into t1 values(1,1),(2,2);
COPY 2
postgres=# PREPARE usrrptplan (int) AS SELECT * FROM t1 WHERE f1=$1;
PREPARE
postgres=# EXECUTE usrrptplan(1);
f1 | f2
----+----
1 | 1
(1 row)