{"Entry":{"collection":"language","key":"internal","name":"internal","aliases":[],"metadata":{"aliases":[],"category":"Native function languages","content_hash":"327a404d56489f3bde4df5e0355167f5d0cc004aded2cc4820126ea837634a8a","imported_at":"2026-09-30T00:40:44.33721+08:00","name":"internal","name_zh":"","slug":"internal","summary":"built-in functions"}},"Definition":{"Collection":"language","Key":"internal","SourceDatabase":"center","Version":"18","SourceTable":"procedural_language","SourceKey":"internal","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"aliases":[],"attributes":{"handler":"","kind":"Native function language","trusted":"f","validator":"fmgr_internal_validator"},"catalog":{"descr":"built-in functions","lanacl":"_null_","laninline":"0","lanispl":"f","lanname":"internal","lanowner":"POSTGRES","lanplcallfoid":"0","lanpltrusted":"f","lanvalidator":"fmgr_internal_validator","oid":"12","oid_symbol":"INTERNALlanguageId"},"comparison_data":{"handler":"","kind":"Native function language","trusted":"f","validator":"fmgr_internal_validator"},"comparison_hash":"d6ad14fc74d34352071f1975e70a9077d1bd11b93deb9f26398e7de1d5cc18b9","description":["built-in functions"],"facts":[{"label":"Kind","value":"Native function language"},{"label":"Trusted","value":"f"},{"label":"Validator","value":"fmgr_internal_validator"}],"manual_html":"\u003cdiv class=\"sect1\" id=\"XFUNC-INTERNAL\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e36.9. Internal Functions \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eInternal functions are functions written in C that have been statically linked into the \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e server. The \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ebody\u003c/span\u003e”\u003c/span\u003e of the function definition specifies the C-language name of the function, which need not be the same as the name being declared for SQL use. (For reasons of backward compatibility, an empty body is accepted as meaning that the C-language function name is the same as the SQL name.)\u003c/p\u003e\n\u003cp\u003eNormally, all internal functions present in the server are declared during the initialization of the database cluster (see \u003ca class=\"xref\" href=\"/docs/18/creating-cluster.html\" title=\"18.2. Creating a Database Cluster\"\u003eSection 18.2\u003c/a\u003e), but a user could use \u003ccode class=\"command\"\u003eCREATE FUNCTION\u003c/code\u003e to create additional alias names for an internal function. Internal functions are declared in \u003ccode class=\"command\"\u003eCREATE FUNCTION\u003c/code\u003e with language name \u003ccode class=\"literal\"\u003einternal\u003c/code\u003e. For instance, to create an alias for the \u003ccode class=\"function\"\u003esqrt\u003c/code\u003e function:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE FUNCTION square_root(double precision) RETURNS double precision\n    AS 'dsqrt'\n    LANGUAGE internal\n    STRICT;\n\u003c/pre\u003e\n\u003cp\u003e(Most internal functions expect to be declared \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003estrict\u003c/span\u003e”\u003c/span\u003e.)\u003c/p\u003e\n\u003cdiv class=\"note\"\u003e\n\u003ch3 class=\"title\"\u003eNote\u003c/h3\u003e\n\u003cp\u003eNot all \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epredefined\u003c/span\u003e”\u003c/span\u003e functions are \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003einternal\u003c/span\u003e”\u003c/span\u003e in the above sense. Some predefined functions are written in SQL.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e","manual_path":"/docs/18/xfunc-internal.html","related":[],"release":{"catalog_fingerprint":"65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502","channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[],"signature":"","sources":[{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18 English manual","path":"xfunc-internal.html","sha256":"643c2623380e298d3a3f2f371d32f3b208ac6717275b64ec75f681a2c3f2fa7f","url":"/docs/18/xfunc-internal.html"}],"tables":[]},"ManualEvidence":{"manual_path":"/docs/18/xfunc-internal.html","release":{"catalog_fingerprint":"65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502","channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18 English manual","path":"xfunc-internal.html","sha256":"643c2623380e298d3a3f2f371d32f3b208ac6717275b64ec75f681a2c3f2fa7f","url":"/docs/18/xfunc-internal.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"language","Key":"internal","SourceDatabase":"center","Version":"18","Locale":"en","Title":"internal","Summary":"built-in functions","BodyHTML":"\u003cdiv id=\"XFUNC-INTERNAL\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2\u003e36.9. Internal Functions \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eInternal functions are functions written in C that have been statically linked into the \u003cspan\u003ePostgreSQL\u003c/span\u003e server. The \u003cspan\u003e“\u003cspan\u003ebody\u003c/span\u003e”\u003c/span\u003e of the function definition specifies the C-language name of the function, which need not be the same as the name being declared for SQL use. (For reasons of backward compatibility, an empty body is accepted as meaning that the C-language function name is the same as the SQL name.)\u003c/p\u003e\n\u003cp\u003eNormally, all internal functions present in the server are declared during the initialization of the database cluster (see \u003ca href=\"/docs/18/creating-cluster.html\" rel=\"nofollow\"\u003eSection 18.2\u003c/a\u003e), but a user could use \u003ccode\u003eCREATE FUNCTION\u003c/code\u003e to create additional alias names for an internal function. Internal functions are declared in \u003ccode\u003eCREATE FUNCTION\u003c/code\u003e with language name \u003ccode\u003einternal\u003c/code\u003e. For instance, to create an alias for the \u003ccode\u003esqrt\u003c/code\u003e function:\u003c/p\u003e\n\u003cpre\u003eCREATE FUNCTION square_root(double precision) RETURNS double precision\n    AS \u0026#39;dsqrt\u0026#39;\n    LANGUAGE internal\n    STRICT;\n\u003c/pre\u003e\n\u003cp\u003e(Most internal functions expect to be declared \u003cspan\u003e“\u003cspan\u003estrict\u003c/span\u003e”\u003c/span\u003e.)\u003c/p\u003e\n\u003cdiv\u003e\n\u003ch3\u003eNote\u003c/h3\u003e\n\u003cp\u003eNot all \u003cspan\u003e“\u003cspan\u003epredefined\u003c/span\u003e”\u003c/span\u003e functions are \u003cspan\u003e“\u003cspan\u003einternal\u003c/span\u003e”\u003c/span\u003e in the above sense. Some predefined functions are written in SQL.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"803e882ef4552496a7597b7de3b35827126eaaf44755adb72355d0dcd4185840","Payload":{"description":["built-in functions"],"manual_html":"\u003cdiv class=\"sect1\" id=\"XFUNC-INTERNAL\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e36.9. Internal Functions \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eInternal functions are functions written in C that have been statically linked into the \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e server. The \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ebody\u003c/span\u003e”\u003c/span\u003e of the function definition specifies the C-language name of the function, which need not be the same as the name being declared for SQL use. (For reasons of backward compatibility, an empty body is accepted as meaning that the C-language function name is the same as the SQL name.)\u003c/p\u003e\n\u003cp\u003eNormally, all internal functions present in the server are declared during the initialization of the database cluster (see \u003ca class=\"xref\" href=\"/docs/18/creating-cluster.html\" title=\"18.2. Creating a Database Cluster\"\u003eSection 18.2\u003c/a\u003e), but a user could use \u003ccode class=\"command\"\u003eCREATE FUNCTION\u003c/code\u003e to create additional alias names for an internal function. Internal functions are declared in \u003ccode class=\"command\"\u003eCREATE FUNCTION\u003c/code\u003e with language name \u003ccode class=\"literal\"\u003einternal\u003c/code\u003e. For instance, to create an alias for the \u003ccode class=\"function\"\u003esqrt\u003c/code\u003e function:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE FUNCTION square_root(double precision) RETURNS double precision\n    AS 'dsqrt'\n    LANGUAGE internal\n    STRICT;\n\u003c/pre\u003e\n\u003cp\u003e(Most internal functions expect to be declared \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003estrict\u003c/span\u003e”\u003c/span\u003e.)\u003c/p\u003e\n\u003cdiv class=\"note\"\u003e\n\u003ch3 class=\"title\"\u003eNote\u003c/h3\u003e\n\u003cp\u003eNot all \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epredefined\u003c/span\u003e”\u003c/span\u003e functions are \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003einternal\u003c/span\u003e”\u003c/span\u003e in the above sense. Some predefined functions are written in SQL.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e","related":[],"sections":[],"tables":[]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
