From 2fa7a041f38de62c45091736cac34cc046f494b9 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Tue, 11 Jul 2006 19:11:26 +0000 Subject: [PATCH] Correct the description of the pg_get_viewdef() function. Do some nearby SGML cleanup: sort table entries alphabetically. --- doc/src/sgml/func.sgml | 134 ++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 69 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 78f998e782..c46a8f452e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -9496,34 +9496,26 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); get SQL name of a data type - pg_get_viewdef(view_name) - text - get CREATE VIEW command for view (deprecated) - - - pg_get_viewdef(view_name, pretty_bool) - text - get CREATE VIEW command for view (deprecated) - - - pg_get_viewdef(view_oid) + pg_get_constraintdef(constraint_oid) text - get CREATE VIEW command for view + get definition of a constraint - pg_get_viewdef(view_oid, pretty_bool) + pg_get_constraintdef(constraint_oid, pretty_bool) text - get CREATE VIEW command for view + get definition of a constraint - pg_get_ruledef(rule_oid) + pg_get_expr(expr_text, relation_oid) text - get CREATE RULE command for rule + decompile internal form of an expression, assuming that any Vars + in it refer to the relation indicated by the second parameter - pg_get_ruledef(rule_oid, pretty_bool) + pg_get_expr(expr_text, relation_oid, pretty_bool) text - get CREATE RULE command for rule + decompile internal form of an expression, assuming that any Vars + in it refer to the relation indicated by the second parameter pg_get_indexdef(index_oid) @@ -9538,31 +9530,30 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); column_no is not zero - pg_get_triggerdef(trigger_oid) + pg_get_ruledef(rule_oid) text - get CREATE [ CONSTRAINT ] TRIGGER command for trigger + get CREATE RULE command for rule - pg_get_constraintdef(constraint_oid) + pg_get_ruledef(rule_oid, pretty_bool) text - get definition of a constraint + get CREATE RULE command for rule - pg_get_constraintdef(constraint_oid, pretty_bool) + pg_get_serial_sequence(table_name, column_name) text - get definition of a constraint + get name of the sequence that a serial or bigserial column + uses - pg_get_expr(expr_text, relation_oid) - text - decompile internal form of an expression, assuming that any Vars - in it refer to the relation indicated by the second parameter + pg_tablespace_databases(tablespace_oid) + setof oid + get the set of database OIDs that have objects in the tablespace - pg_get_expr(expr_text, relation_oid, pretty_bool) + pg_get_triggerdef(trigger_oid) text - decompile internal form of an expression, assuming that any Vars - in it refer to the relation indicated by the second parameter + get CREATE [ CONSTRAINT ] TRIGGER command for trigger pg_get_userbyid(roleid) @@ -9570,15 +9561,24 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); get role name with given ID - pg_get_serial_sequence(table_name, column_name) + pg_get_viewdef(view_name) text - get name of the sequence that a serial or bigserial column - uses + get underlying SELECT command for view (deprecated) - pg_tablespace_databases(tablespace_oid) - setof oid - get the set of database OIDs that have objects in the tablespace + pg_get_viewdef(view_name, pretty_bool) + text + get underlying SELECT command for view (deprecated) + + + pg_get_viewdef(view_oid) + text + get underlying SELECT command for view + + + pg_get_viewdef(view_oid, pretty_bool) + text + get underlying SELECT command for view @@ -9591,30 +9591,22 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); - pg_get_viewdef, - pg_get_ruledef, - pg_get_indexdef, - pg_get_triggerdef, and - pg_get_constraintdef respectively - reconstruct the creating command for a view, rule, index, trigger, or - constraint. (Note that this is a decompiled reconstruction, not - the original text of the command.) + pg_get_constraintdef, + pg_get_indexdef, pg_get_ruledef, + and pg_get_triggerdef, respectively reconstruct the + creating command for a constraint, index, rule, or trigger. (Note that this + is a decompiled reconstruction, not the original text of the command.) pg_get_expr decompiles the internal form of an - individual expression, such as the default value for a column. It - may be useful when examining the contents of system catalogs. - Most of these functions come in two - variants, one of which can optionally pretty-print the result. - The pretty-printed format is more readable, but the default format is more - likely to be - interpreted the same way by future versions of PostgreSQL; - avoid using pretty-printed output for dump purposes. - Passing false for the pretty-print parameter yields the - same result as the variant that does not have the parameter at all. - - - - pg_get_userbyid extracts a role's name given - its OID. + individual expression, such as the default value for a column. It may be + useful when examining the contents of system catalogs. + pg_get_viewdef reconstructs the SELECT + query that defines a view. Most of these functions come in two variants, + one of which can optionally pretty-print the result. The + pretty-printed format is more readable, but the default format is more + likely to be interpreted the same way by future versions of + PostgreSQL; avoid using pretty-printed output for dump + purposes. Passing false for the pretty-print parameter yields + the same result as the variant that does not have the parameter at all. @@ -9626,14 +9618,18 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); - pg_tablespace_databases allows a tablespace to - be examined. It returns the set of OIDs of databases that have objects - stored in the tablespace. If this function returns any rows, the - tablespace is not empty and cannot be dropped. To - display the specific objects populating the tablespace, you will need - to connect to the databases identified by - pg_tablespace_databases and query their - pg_class catalogs. + pg_tablespace_databases allows a tablespace to be + examined. It returns the set of OIDs of databases that have objects stored + in the tablespace. If this function returns any rows, the tablespace is not + empty and cannot be dropped. To display the specific objects populating the + tablespace, you will need to connect to the databases identified by + pg_tablespace_databases and query their + pg_class catalogs. + + + + pg_get_userbyid extracts a role's name given + its OID. -- 2.40.0