{"Entry":{"collection":"psql","key":"cmd-73-66","name":"\\sf","aliases":["\\sf","\\sf+"],"metadata":{"aliases":["\\sf","\\sf+"],"category":"Query buffer and editing","content_hash":"e713a0b00e717990cec3641578ff15ac92386e66f03e41c0c15142b7da7b2318","derived_content_hash":"0c5673a5c6a86d6fe2cfda085e136e5653db5df8a4b2a28fafdbf1369691d896","documentation_refresh":{"batch":"20261113","original_source_rev":"","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"imported_at":"2026-09-30T00:40:45.191666+08:00","name":"\\sf","name_zh":"","slug":"cmd-73-66","summary":"This command fetches and shows the definition of the named function or procedure, in the form of a CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE command. The definition is printed to the current query output channel, as set by \\o ."}},"Definition":{"Collection":"psql","Key":"cmd-73-66","SourceDatabase":"center","Version":"18","SourceTable":"psql_command","SourceKey":"cmd-73-66","SourceRevision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","Facts":{"command":"\\sf","comparison_data":{"definition":"This command fetches and shows the definition of the named function or procedure, in the form of a CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE command. The definition is printed to the current query output channel, as set by \\o . The target function can be specified by name alone, or by name and arguments, for example foo(integer, text) . The argument types must be given if there is more than one function of the same name. If + is appended to the command name, then the output lines are numbered, with the first line of the function body being line 1. Unlike most other meta-commands, the entire remainder of the line is always taken to be the argument(s) of \\sf , and neither variable interpolation nor backquote expansion are performed in the arguments.","modifiers":[{"command":"\\sf","modifiers":"+"}],"signature":"\\sf[+] function_description","spellings":["\\sf"]},"comparison_hash":"c1a1045b941903d3e093793b2e96097812f520ddce2bebb33b89e645939bd9b1","description":["This command fetches and shows the definition of the named function or procedure, in the form of a CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE command. The definition is printed to the current query output channel, as set by \\o ."],"description_zh":"这个命令获取并显示指定函数或过程的定义，以 CREATE OR REPLACE FUNCTION 或 CREATE OR REPLACE PROCEDURE 命令的形式呈现。定义将打印到当前查询输出通道，由 \\o 设置。","description_zh_html":"\u003cdd\u003e\u003cp\u003e\n         这个命令获取并显示指定函数或过程的定义，以 \u003ccode class=\"command\"\u003eCREATE OR REPLACE FUNCTION\u003c/code\u003e 或\n         \u003ccode class=\"command\"\u003eCREATE OR REPLACE PROCEDURE\u003c/code\u003e 命令的形式呈现。定义将打印到当前查询输出通道，由\u003ccode class=\"command\"\u003e\\o\u003c/code\u003e 设置。\n        \u003c/p\u003e\u003cp\u003e目标函数可以只用名称指定，也可以同时给出名称和参数，例如 \u003ccode class=\"literal\"\u003efoo(integer, text)\u003c/code\u003e。如果存在多个同名函数，就必须给出参数类型。\u003c/p\u003e\u003cp\u003e如果在命令名后附加\u003ccode class=\"literal\"\u003e+\u003c/code\u003e，输出行会带上行号，函数体的第一行编号为 1。\u003c/p\u003e\u003cp\u003e\n        与大多数其他元命令不同，整个行的剩余部分始终被视为\u003ccode class=\"command\"\u003e\\sf\u003c/code\u003e 的参数，参数中不进行变量插值或反引号扩展。\n        \u003c/p\u003e\u003c/dd\u003e","documentation_revision":{"inputs":[{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","version":"18.7"},{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"cb475c53a16d9e06358f5e6c9c5649645db92568cfd319f230c62c9f57ae090b","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"facts":[{"label":"Client","value":"psql 18.7"},{"label":"Case-sensitive spelling","value":"\\sf"}],"facts_zh":[{"label":"客户端","value":"psql 18.7"},{"label":"区分大小写的写法","value":"\\sf"}],"localization":{"documentation_release":"18.7","language":"en","source_language":"en","source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552","status":"same-version-reviewed-manual"},"manual_html":"\u003cdiv\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-SF\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\sf[+] \u003cem class=\"replaceable\"\u003e\u003ccode\u003efunction_description\u003c/code\u003e\u003c/em\u003e \u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         This command fetches and shows the definition of the named function or procedure,\n         in the form of a \u003ccode class=\"command\"\u003eCREATE OR REPLACE FUNCTION\u003c/code\u003e or\n         \u003ccode class=\"command\"\u003eCREATE OR REPLACE PROCEDURE\u003c/code\u003e command.\n         The definition is printed to the current query output channel,\n         as set by \u003ccode class=\"command\"\u003e\\o\u003c/code\u003e.\n        \u003c/p\u003e\u003cp\u003e\n         The target function can be specified by name alone, or by name\n         and arguments, for example \u003ccode class=\"literal\"\u003efoo(integer, text)\u003c/code\u003e.\n         The argument types must be given if there is more\n         than one function of the same name.\n        \u003c/p\u003e\u003cp\u003e\n         If \u003ccode class=\"literal\"\u003e+\u003c/code\u003e is appended to the command name, then the\n         output lines are numbered, with the first line of the function body\n         being line 1.\n        \u003c/p\u003e\u003cp\u003e\n        Unlike most other meta-commands, the entire remainder of the line is\n        always taken to be the argument(s) of \u003ccode class=\"command\"\u003e\\sf\u003c/code\u003e, and neither\n        variable interpolation nor backquote expansion are performed in the\n        arguments.\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","manual_path":"app-psql.html#APP-PSQL-META-COMMAND-SF","modifiers":[{"command":"\\sf","modifiers":"+"}],"related":[{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"related_zh":[{"label":"psql 命令行选项及完整手册","url":"/wiki/tool/psql/?v=18"}],"release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.7","major":"18","manifest":{"major":"18","release":"18.7","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd","source_url":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2"},"ref":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2","revision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd"},"sections":[],"sections_zh":[],"signature":"\\sf[+] function_description","sources":[{"anchor":"APP-PSQL-META-COMMAND-SF","file":"app-psql.html","label":"18.7 English manual · app-psql.html","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-SF"}],"spellings":["\\sf"],"tables":[{"columns":[{"key":"command","label":"Command"},{"key":"modifiers","label":"Documented suffix modifiers"}],"key":"spellings","rows":[{"command":{"text":"\\sf","url":"/wiki/psql/cmd-73-66/?v=18"},"modifiers":"+"}],"title":"Spellings in this manual definition"}],"tables_zh":[{"columns":[{"key":"command","label":"命令"},{"key":"modifiers","label":"手册中的后缀修饰符"}],"key":"spellings","rows":[{"command":{"text":"\\sf","url":"/wiki/psql/cmd-73-66/?v=18"},"modifiers":"+"}],"title":"本版手册中的写法"}],"zh_from":"same-version-manual"},"ManualEvidence":{"manual_path":"app-psql.html#APP-PSQL-META-COMMAND-SF","release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.7","major":"18","manifest":{"major":"18","release":"18.7","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd","source_url":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2"},"ref":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2","revision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd"},"sources":[{"anchor":"APP-PSQL-META-COMMAND-SF","file":"app-psql.html","label":"18.7 English manual · app-psql.html","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-SF"}]},"MeasuredEvidence":{}},"Text":{"Collection":"psql","Key":"cmd-73-66","SourceDatabase":"center","Version":"18","Locale":"en","Title":"\\sf","Summary":"This command fetches and shows the definition of the named function or procedure, in the form of a CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE command. The definition is printed to the current query output channel, as set by \\o .","BodyHTML":"\u003cdiv\u003e\u003cdl\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-SF\"\u003e\u003cspan\u003e\u003ccode\u003e\\sf[+] \u003cem\u003e\u003ccode\u003efunction_description\u003c/code\u003e\u003c/em\u003e \u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         This command fetches and shows the definition of the named function or procedure,\n         in the form of a \u003ccode\u003eCREATE OR REPLACE FUNCTION\u003c/code\u003e or\n         \u003ccode\u003eCREATE OR REPLACE PROCEDURE\u003c/code\u003e command.\n         The definition is printed to the current query output channel,\n         as set by \u003ccode\u003e\\o\u003c/code\u003e.\n        \u003c/p\u003e\u003cp\u003e\n         The target function can be specified by name alone, or by name\n         and arguments, for example \u003ccode\u003efoo(integer, text)\u003c/code\u003e.\n         The argument types must be given if there is more\n         than one function of the same name.\n        \u003c/p\u003e\u003cp\u003e\n         If \u003ccode\u003e+\u003c/code\u003e is appended to the command name, then the\n         output lines are numbered, with the first line of the function body\n         being line 1.\n        \u003c/p\u003e\u003cp\u003e\n        Unlike most other meta-commands, the entire remainder of the line is\n        always taken to be the argument(s) of \u003ccode\u003e\\sf\u003c/code\u003e, and neither\n        variable interpolation nor backquote expansion are performed in the\n        arguments.\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","SourceRevision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","ContentHash":"7277298107961c23a6115df98fd0910049b478cd5288ffc087f1b204b17b8960","Payload":{"description":["This command fetches and shows the definition of the named function or procedure, in the form of a CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE command. The definition is printed to the current query output channel, as set by \\o ."],"manual_html":"\u003cdiv\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-SF\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\sf[+] \u003cem class=\"replaceable\"\u003e\u003ccode\u003efunction_description\u003c/code\u003e\u003c/em\u003e \u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         This command fetches and shows the definition of the named function or procedure,\n         in the form of a \u003ccode class=\"command\"\u003eCREATE OR REPLACE FUNCTION\u003c/code\u003e or\n         \u003ccode class=\"command\"\u003eCREATE OR REPLACE PROCEDURE\u003c/code\u003e command.\n         The definition is printed to the current query output channel,\n         as set by \u003ccode class=\"command\"\u003e\\o\u003c/code\u003e.\n        \u003c/p\u003e\u003cp\u003e\n         The target function can be specified by name alone, or by name\n         and arguments, for example \u003ccode class=\"literal\"\u003efoo(integer, text)\u003c/code\u003e.\n         The argument types must be given if there is more\n         than one function of the same name.\n        \u003c/p\u003e\u003cp\u003e\n         If \u003ccode class=\"literal\"\u003e+\u003c/code\u003e is appended to the command name, then the\n         output lines are numbered, with the first line of the function body\n         being line 1.\n        \u003c/p\u003e\u003cp\u003e\n        Unlike most other meta-commands, the entire remainder of the line is\n        always taken to be the argument(s) of \u003ccode class=\"command\"\u003e\\sf\u003c/code\u003e, and neither\n        variable interpolation nor backquote expansion are performed in the\n        arguments.\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","related":[{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"sections":[],"tables":[{"columns":[{"key":"command","label":"Command"},{"key":"modifiers","label":"Documented suffix modifiers"}],"key":"spellings","rows":[{"command":{"text":"\\sf","url":"/wiki/psql/cmd-73-66/?v=18"},"modifiers":"+"}],"title":"Spellings in this manual definition"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":[{"Version":"18","Ordinal":0,"Command":"\\sf","Signature":"\\sf[+] function_description","Modifiers":[{"command":"\\sf","modifiers":"+"}]}],"SQLState":null,"Evidence":null}
