↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Functions

pg_get_viewdef

Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)

English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

group
info
group label
系统信息函数和操作符
lang
en
layout
table-new
pages
functions-info.html
prose only
false

Definition PG 18

Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)

Signatures and overloads

pg_get_viewdef ( view oid [, pretty boolean] ) → text → text
Reconstructs the underlying SELECT command for a view or materialized view. (This is a decompiled reconstruction, not the original text of the command.)
pg_get_viewdef ( view oid, wrap_column integer ) → text → text
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.
pg_get_viewdef ( view text [, pretty boolean] ) → text → text
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.)

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","version":"18.7"},{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"f9684137c0b9fb17a691c4d905529d114472a507a007c15058f2703962b611d2","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:b3f23d4a83e61dcd335e4704d3a2e01cafb96e9721e2e9575d358e6bd2047e0e

Text language: en · wiki-repair-20261023:b3f23d4a83e61dcd335e4704d3a2e01cafb96e9721e2e9575d358e6bd2047e0e