{"Entry":{"collection":"func","key":"row-to-json","name":"row_to_json","aliases":[],"metadata":{"changed_in":["9.3","9.4"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.1","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.2"},{"descriptions_changed":false,"doc_overhaul":false,"from":"9.2","group_changed":null,"signatures":{"added":["row_to_json ( record [, pretty_bool] ) → json"],"removed":["row_to_json ( record [, pretty_bool] )"]},"status":"changed","to":"9.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":["row_to_json ( record [, pretty_bool] )"],"removed":["row_to_json ( record [, pretty_bool] ) → json"]},"status":"changed","to":"9.4"},{"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"}],"content_hash":"925699bf75301af0569694162e4011683662813da700bc39868bd7a67b718531","derived_content_hash":"a3a4aaffc6ac180c8dbbf4d0270163ddc6eed4e1a9f99be4372eb4e911ae4574","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:cb0face434183a82d998101a3283ce7c67dc8e69cf5617fc84bbd53c37fb17ba","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"9.2","group":"json","group_label":"Json Functions And Operators","groups":["json"],"imported_at":"2026-09-14T21:49:48.818297+08:00","last_version":"20","name":"row_to_json","name_key":"row_to_json","position":16058,"present_in":["9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:5c23d4f4114106ca41f72c8ffd3d9fd78f0f843bd20d20bb75e676a4ac5498f8","receipt_sha256":"fe3bce189df6db6c488e40b876eee324e0d7d796827d32014c8548a1ae718328","repair":"wiki-repair-20261023"},"signature":"row_to_json ( record [, boolean ] ) → json","signature_count":1,"slug":"row-to-json","source_rev":"wiki-repair-20261023:cb0face434183a82d998101a3283ce7c67dc8e69cf5617fc84bbd53c37fb17ba","summary":"Converts an SQL composite value to a JSON object.","summary_zh":""}},"Definition":{"Collection":"func","Key":"row-to-json","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"row-to-json","SourceRevision":"wiki-repair-20261023:cb0face434183a82d998101a3283ce7c67dc8e69cf5617fc84bbd53c37fb17ba","Facts":{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"将 SQL 复合值转换为 JSON 对象。该行为与 to_json 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","description_zh_html":"将 SQL 复合值转换为 JSON 对象。该行为与 \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","doc":{"anchor":"FUNCTIONS-JSON-CREATION-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","version":"18.7"},{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"31b98fa7f00387abf441728c31918bfe8b368642bceeb8bba88a73c3fbd607de","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"json","group_label":"JSON 函数和操作符","lang":"en","layout":"table-new","pages":["functions-json.html"],"prose_only":false,"signatures":[{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"将 SQL 复合值转换为 JSON 对象。该行为与 to_json 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","description_zh_html":"将 SQL 复合值转换为 JSON 对象。该行为与 \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","examples":[{"expr":"row_to_json(row(1,'foo'))","result":"{\"f1\":1,\"f2\":\"foo\"}"}],"html":"\u003ccode class=\"function\"\u003erow_to_json\u003c/code\u003e ( \u003ccode class=\"type\"\u003erecord\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"row_to_json ( record [, boolean] ) → json","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-json.html","sha256":"a412feb14a229f1d9f14fa2d7735255aa297d5eb8f2971d744d9dfee659c7cca"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-JSON-CREATION-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"row-to-json","SourceDatabase":"center","Version":"18","Locale":"en","Title":"row_to_json","Summary":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","BodyHTML":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","SourceRevision":"wiki-repair-20261023:cb0face434183a82d998101a3283ce7c67dc8e69cf5617fc84bbd53c37fb17ba","ContentHash":"315b9361d7c62936e69b0012200fe851b774c329d43169c21e60ebea88259224","Payload":{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","signatures":[{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"将 SQL 复合值转换为 JSON 对象。该行为与 to_json 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","description_zh_html":"将 SQL 复合值转换为 JSON 对象。该行为与 \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","examples":[{"expr":"row_to_json(row(1,'foo'))","result":"{\"f1\":1,\"f2\":\"foo\"}"}],"html":"\u003ccode class=\"function\"\u003erow_to_json\u003c/code\u003e ( \u003ccode class=\"type\"\u003erecord\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"row_to_json ( record [, boolean] ) → json","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"a465a059d510d899f622f0f0d1a1dcbe1785944fd773c7a71f15491040fb0a6d","Text":"row_to_json ( record [, boolean] ) → json","Returns":"json","Payload":{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"将 SQL 复合值转换为 JSON 对象。该行为与 to_json 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","description_zh_html":"将 SQL 复合值转换为 JSON 对象。该行为与 \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e 相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","examples":[{"expr":"row_to_json(row(1,'foo'))","result":"{\"f1\":1,\"f2\":\"foo\"}"}],"html":"\u003ccode class=\"function\"\u003erow_to_json\u003c/code\u003e ( \u003ccode class=\"type\"\u003erecord\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"row_to_json ( record [, boolean] ) → json","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
