跳到主要内容
跳到主要内容

SET 语句

SET param = value

value 分配给当前会话的 param 设置。您不能通过这种方式更改 服务器设置

您还可以在单个查询中设置指定设置配置文件的所有值。

SET profile = 'profile-name-from-the-settings-file'

对于设置为 true 的布尔值设置,您可以通过省略值分配使用简写语法。当仅指定设置名称时,它会自动设置为 1 (true)。

-- These are equivalent:
SET force_index_by_date = 1
SET force_index_by_date

有关更多信息,请参见 设置