Postgres

Administrator
发布于 2023-12-29 / 11 阅读
0
0

Postgres

PostgreSQL

PostgreSQL 配置

引用 设置postgresql参数

postgres配置的原则

当有多个配置时,使用最后一个的配置,使用范围最小的配置

postgres 配置

postgresql.conf

postgresql.auto.conf  <=> ALTER SYSTEM SET XXX

ALTER USER SET XXX

SET XXX

pg_ctl 传递配置参数

pg_ctl -D home/hs/db12/ -l dev/null -o "--timezone=UTC-3" restart

函数设置配置参数

postgres=# \h CREATE FUNCTION
Command:     CREATE FUNCTION
Description: define a new function
Syntax:
CREATE [ OR REPLACE ] FUNCTION
    name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } default_expr ] [, ...] ] )
    [ RETURNS rettype
      | RETURNS TABLE ( column_name column_type [, ...] ) ]
  { LANGUAGE lang_name
    | TRANSFORM { FOR TYPE type_name } [, ... ]
    | WINDOW
    | { IMMUTABLE | STABLE | VOLATILE }
    | [ NOT ] LEAKPROOF
    | { CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT }
    | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER }
    | PARALLEL { UNSAFE | RESTRICTED | SAFE }
    | COST execution_cost
    | ROWS result_rows
    | SUPPORT support_function
    | SET configuration_parameter { TO value | = value | FROM CURRENT }
    | AS 'definition'
    | AS 'obj_file', 'link_symbol'
    | sql_body
  } ...

URL: https://www.postgresql.org/docs/devel/sql-createfunction.html

postgres=#


评论