{"Entry":{"collection":"func","key":"quote-nullable","name":"quote_nullable","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.4"},{"descriptions_changed":true,"doc_overhaul":false,"from":"8.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.5","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.6"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"10"},{"descriptions_changed":true,"doc_overhaul":false,"from":"10","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"11"},{"descriptions_changed":true,"doc_overhaul":false,"from":"11","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"12"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"13","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"14"},{"descriptions_changed":true,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"17"}],"content_hash":"81ca8b93935da2ab4fc8b11f37a72eaa4d5c15eaf6eded0642d32d083f4864e8","first_version":"8.4","group":"string","group_label":"String Functions And Operators","groups":["string"],"imported_at":"2026-09-27T17:57:28.387523+08:00","last_version":"20","name":"quote_nullable","name_key":"quote_nullable","position":3026,"present_in":["8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"quote_nullable ( text ) → text","signature_count":2,"slug":"quote-nullable","source_rev":"b7bd9cda","summary":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns NULL.","summary_zh":""}},"Definition":{"Collection":"func","Key":"quote-nullable","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"quote-nullable","SourceRevision":"b7bd9cda","Facts":{"description":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled. See also Example 41.1.","description_html":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. Embedded single-quotes and backslashes are properly doubled. See also \u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" title=\"Example 41.1. Quoting Values in Dynamic Queries\"\u003eExample 41.1\u003c/a\u003e.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"},"group":"string","group_label":"String Functions And Operators","lang":"en","layout":"table-new","pages":["functions-string.html"],"prose_only":false,"signatures":[{"description":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled. See also Example 41.1.","description_html":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. Embedded single-quotes and backslashes are properly doubled. See also \u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" title=\"Example 41.1. Quoting Values in Dynamic Queries\"\u003eExample 41.1\u003c/a\u003e.","description_zh":"","description_zh_html":"","examples":[{"expr":"quote_nullable(NULL)","result":"NULL"}],"html":"\u003ccode class=\"function\"\u003equote_nullable\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"quote_nullable ( text ) → text","zh_from":""},{"description":"Converts the given value to text and then quotes it as a literal; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled.","description_html":"Converts the given value to text and then quotes it as a literal; or, if the argument is null, returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. Embedded single-quotes and backslashes are properly doubled.","description_zh":"","description_zh_html":"","examples":[{"expr":"quote_nullable(42.5)","result":"'42.5'"}],"html":"\u003ccode class=\"function\"\u003equote_nullable\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"quote_nullable ( anyelement ) → text","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"quote-nullable","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"quote_nullable","Summary":"为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回NULL。内嵌的单引号和反斜杠会被适当地双写。另见例 41.1。","BodyHTML":"为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回\u003ccode\u003eNULL\u003c/code\u003e。内嵌的单引号和反斜杠会被适当地双写。另见\u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" rel=\"nofollow\"\u003e例 41.1\u003c/a\u003e。\u003cpre\u003equote_nullable ( text ) → text\u003c/pre\u003e为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回\u003ccode\u003eNULL\u003c/code\u003e。内嵌的单引号和反斜杠会被适当地双写。另见\u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" rel=\"nofollow\"\u003e例 41.1\u003c/a\u003e。\u003cpre\u003equote_nullable ( anyelement ) → text\u003c/pre\u003e将给定值转换为文本，然后作为字面量加引号；如果参数为 null，则返回\u003ccode\u003eNULL\u003c/code\u003e。内嵌的单引号和反斜杠会被适当地双写。","SourceRevision":"ca936764","ContentHash":"5f1607d6c816da73895d73e00746536c5149e6a58e9f571f4bc35d94d0542830","Payload":{"description_zh":"为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回NULL。内嵌的单引号和反斜杠会被适当地双写。另见例 41.1。","description_zh_html":"为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。内嵌的单引号和反斜杠会被适当地双写。另见\u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" title=\"例 41.1. 在动态查询中为值加引号\"\u003e例 41.1\u003c/a\u003e。","signatures":[{"description_zh":"为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回NULL。内嵌的单引号和反斜杠会被适当地双写。另见例 41.1。","description_zh_html":"为给定字符串添加适当的引号并返回，使其可用作SQL语句字符串中的字符串字面量；如果参数为 null，则返回\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。内嵌的单引号和反斜杠会被适当地双写。另见\u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" title=\"例 41.1. 在动态查询中为值加引号\"\u003e例 41.1\u003c/a\u003e。","returns":"text","text":"quote_nullable ( text ) → text","zh_from":"doc"},{"description_zh":"将给定值转换为文本，然后作为字面量加引号；如果参数为 null，则返回NULL。内嵌的单引号和反斜杠会被适当地双写。","description_zh_html":"将给定值转换为文本，然后作为字面量加引号；如果参数为 null，则返回\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。内嵌的单引号和反斜杠会被适当地双写。","returns":"text","text":"quote_nullable ( anyelement ) → text","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"958a00c0ea448ac267846bdd2a6a0c9698a8b71ba7c152482dd53e8db12b4b4a","Text":"quote_nullable ( text ) → text","Returns":"text","Payload":{"description":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled. See also Example 41.1.","description_html":"Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. Embedded single-quotes and backslashes are properly doubled. See also \u003ca href=\"/docs/18/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE\" title=\"Example 41.1. Quoting Values in Dynamic Queries\"\u003eExample 41.1\u003c/a\u003e.","description_zh":"","description_zh_html":"","examples":[{"expr":"quote_nullable(NULL)","result":"NULL"}],"html":"\u003ccode class=\"function\"\u003equote_nullable\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"quote_nullable ( text ) → text","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"f30fdabc25168aaf8dbe782c1172f942c3a4d723f24de3560f6d7d5e73b3b78a","Text":"quote_nullable ( anyelement ) → text","Returns":"text","Payload":{"description":"Converts the given value to text and then quotes it as a literal; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled.","description_html":"Converts the given value to text and then quotes it as a literal; or, if the argument is null, returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. Embedded single-quotes and backslashes are properly doubled.","description_zh":"","description_zh_html":"","examples":[{"expr":"quote_nullable(42.5)","result":"'42.5'"}],"html":"\u003ccode class=\"function\"\u003equote_nullable\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"quote_nullable ( anyelement ) → text","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
