{"Entry":{"collection":"func","key":"pg-get-viewdef","name":"pg_get_viewdef","aliases":[],"metadata":{"changed_in":["7.3","7.4","9.2"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.1","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"7.2"},{"descriptions_changed":true,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":["pg_get_viewdef ( viewOID ) → text"],"removed":[]},"status":"changed","to":"7.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"7.3","group_changed":null,"signatures":{"added":["pg_get_viewdef ( view_name ) → text","pg_get_viewdef ( view_name, pretty_bool ) → text","pg_get_viewdef ( view_oid ) → text","pg_get_viewdef ( view_oid, pretty_bool ) → text"],"removed":["pg_get_viewdef ( viewname ) → text","pg_get_viewdef ( viewOID ) → text"]},"status":"changed","to":"7.4"},{"descriptions_changed":false,"doc_overhaul":false,"from":"7.4","group_changed":{"from":"misc","to":"info"},"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":false,"from":"9.1","group_changed":null,"signatures":{"added":["pg_get_viewdef ( view_oid, wrap_column_int ) → text"],"removed":[]},"status":"changed","to":"9.2"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.3"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"91406088005039e2903b3813b3df1ea5675dbf3ab101efc1f32f1c7d02ae3573","first_version":"7.2","group":"info","group_label":"System Information Functions And Operators","groups":["misc","info"],"imported_at":"2026-09-27T17:57:29.226515+08:00","last_version":"20","name":"pg_get_viewdef","name_key":"pg_get_viewdef","position":28076,"present_in":["7.2","7.3","7.4","8.0","8.1","8.2","8.3","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":"pg_get_viewdef ( view oid [, pretty boolean ] ) → text","signature_count":3,"slug":"pg-get-viewdef","source_rev":"b7bd9cda","summary":"Reconstructs the underlying SELECT command for a view or materialized view.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-get-viewdef","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-get-viewdef","SourceRevision":"b7bd9cda","Facts":{"description":"Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","slug":"18"},"group":"info","group_label":"System Information Functions And Operators","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eview\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epretty\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_viewdef ( view oid [, pretty boolean ] ) → text","zh_from":""},{"description":"Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.) In this form of the function, pretty-printing is always enabled, and long lines are wrapped to try to keep them shorter than the specified number of columns.","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.) In this form of the function, pretty-printing is always enabled, and long lines are wrapped to try to keep them shorter than the specified number of columns.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eview\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ewrap_column\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_viewdef ( view oid, wrap_column integer ) → text","zh_from":""},{"description":"Reconstructs the underlying SELECT command for a view or materialized view, working from a textual name for the view rather than its OID. (This is deprecated; use the OID variant instead.)","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view, working from a textual name for the view rather than its OID. (This is deprecated; use the OID variant instead.)","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eview\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epretty\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_viewdef ( view text [, pretty boolean ] ) → text","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-get-viewdef","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_get_viewdef","Summary":"重建定义视图或物化视图的SELECT命令。（这是反编译重建的结果，并非命令的原始文本。）","BodyHTML":"重建定义视图或物化视图的\u003ccode\u003eSELECT\u003c/code\u003e命令。（这是反编译重建的结果，并非命令的原始文本。）\u003cpre\u003epg_get_viewdef ( view oid [, pretty boolean ] ) → text\u003c/pre\u003e重建定义视图或物化视图的\u003ccode\u003eSELECT\u003c/code\u003e命令。（这是反编译重建的结果，并非命令的原始文本。）\u003cpre\u003epg_get_viewdef ( view oid, wrap_column integer ) → text\u003c/pre\u003e重建定义视图或物化视图的\u003ccode\u003eSELECT\u003c/code\u003e命令。（这是反编译重建的结果，并非命令的原始文本。）这种形式始终启用美化输出，并将长行折行，尽量使每行长度小于指定列数。\u003cpre\u003epg_get_viewdef ( view text [, pretty boolean ] ) → text\u003c/pre\u003e根据视图的文本名称而不是其 OID，重建定义视图或物化视图的\u003ccode\u003eSELECT\u003c/code\u003e命令。（此形式已弃用；请使用 OID 变体。）","SourceRevision":"1b5ca64c","ContentHash":"1ee70fd4b30997aeb5ba662ff8244889da75a8e77a8b40fd849249825f42b828","Payload":{"description_zh":"重建定义视图或物化视图的SELECT命令。（这是反编译重建的结果，并非命令的原始文本。）","description_zh_html":"重建定义视图或物化视图的\u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e命令。（这是反编译重建的结果，并非命令的原始文本。）","signatures":[{"description_zh":"重建定义视图或物化视图的SELECT命令。（这是反编译重建的结果，并非命令的原始文本。）","description_zh_html":"重建定义视图或物化视图的\u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e命令。（这是反编译重建的结果，并非命令的原始文本。）","returns":"text","text":"pg_get_viewdef ( view oid [, pretty boolean ] ) → text","zh_from":"doc"},{"description_zh":"重建定义视图或物化视图的SELECT命令。（这是反编译重建的结果，并非命令的原始文本。）这种形式始终启用美化输出，并将长行折行，尽量使每行长度小于指定列数。","description_zh_html":"重建定义视图或物化视图的\u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e命令。（这是反编译重建的结果，并非命令的原始文本。）这种形式始终启用美化输出，并将长行折行，尽量使每行长度小于指定列数。","returns":"text","text":"pg_get_viewdef ( view oid, wrap_column integer ) → text","zh_from":"doc"},{"description_zh":"根据视图的文本名称而不是其 OID，重建定义视图或物化视图的SELECT命令。（此形式已弃用；请使用 OID 变体。）","description_zh_html":"根据视图的文本名称而不是其 OID，重建定义视图或物化视图的\u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e命令。（此形式已弃用；请使用 OID 变体。）","returns":"text","text":"pg_get_viewdef ( view text [, pretty boolean ] ) → text","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.2","7.3","7.4","8.0","8.1","8.2","8.3","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":"7da9d5d64b06fc41233edd75d01031217ed5a4adaabf296c6375353e20ae75d2","Text":"pg_get_viewdef ( view oid [, pretty boolean ] ) → text","Returns":"text","Payload":{"description":"Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eview\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epretty\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_viewdef ( view oid [, pretty boolean ] ) → text","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"2ed61d861386269ac7462ee5e8ed06613b0082b28c3af059c4d111cd95f40752","Text":"pg_get_viewdef ( view oid, wrap_column integer ) → text","Returns":"text","Payload":{"description":"Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.) In this form of the function, pretty-printing is always enabled, and long lines are wrapped to try to keep them shorter than the specified number of columns.","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.) In this form of the function, pretty-printing is always enabled, and long lines are wrapped to try to keep them shorter than the specified number of columns.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eview\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ewrap_column\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_viewdef ( view oid, wrap_column integer ) → text","zh_from":""}},{"Version":"18","Ordinal":2,"Hash":"bc94481ae95b7e97715b50bdebbc39a731db779cb062ab0e86589b71d0dd31f4","Text":"pg_get_viewdef ( view text [, pretty boolean ] ) → text","Returns":"text","Payload":{"description":"Reconstructs the underlying SELECT command for a view or materialized view, working from a textual name for the view rather than its OID. (This is deprecated; use the OID variant instead.)","description_html":"Reconstructs the underlying \u003ccode class=\"command\"\u003eSELECT\u003c/code\u003e command for a view or materialized view, working from a textual name for the view rather than its OID. (This is deprecated; use the OID variant instead.)","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eview\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epretty\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_viewdef ( view text [, pretty boolean ] ) → text","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
