ALTER SERVER

用于修改外部服务器属性的SQL命令

ALTER SERVER 是用于修改外部服务器属性的 DDL 命令。

ALTER SERVERPostgreSQL 8.4 中添加。

变更历史

示例

使用 ALTER SERVER 修改外部服务器的选项 (此处为:postgres_fdw)

postgres=# ALTER SERVER pg_fdw_test OPTIONS (ADD use_remote_estimate 'true');
ALTER SERVER

postgres=# ALTER SERVER pg_fdw_test OPTIONS (SET use_remote_estimate 'false');
ALTER SERVER

postgres=# ALTER SERVER pg_fdw_test OPTIONS (DROP use_remote_estimate);
ALTER SERVER

请注意,只有在执行 CREATE SERVER 时明确指定了选项,或随后使用 ADD 指定了选项,SET 子句才会被接受。

postgres=# ALTER SERVER pg_fdw_test OPTIONS (SET use_remote_estimate 'true');
ERROR:  option "use_remote_estimate" not found

分类

DDL, 外部数据包装器 (FDW), SQL 命令

另请参阅

CREATE SERVER, DROP SERVER, pg_foreign_server

反馈

在此处提交关于“ALTER SERVER”的任何评论、建议或更正 here