Skip to content

Commit da486d3

Browse files
committed
doc: Clarify that pg_attrdef also stores generation expressions
This was documented with pg_attribute but not with pg_attrdef. Reported-by: jian he <jian.universality@gmail.com> Discussion: https://www.postgresql.org/message-id/CACJufxE+E-iYmBnZVZHiYA+WpyZZVv7BfiBLpo=T70EZHDU9rw@mail.gmail.com
1 parent 2357c92 commit da486d3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,10 +1032,11 @@
10321032

10331033
<para>
10341034
The catalog <structname>pg_attrdef</structname> stores column default
1035-
values. The main information about columns is stored in
1036-
<link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.
1037-
Only columns for which a default value has been explicitly set will have
1038-
an entry here.
1035+
expressions and generation expressions. The main information about columns
1036+
is stored in <link
1037+
linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.
1038+
Only columns for which a default expression or generation expression has
1039+
been explicitly set will have an entry here.
10391040
</para>
10401041

10411042
<table>
@@ -1087,7 +1088,7 @@
10871088
<structfield>adbin</structfield> <type>pg_node_tree</type>
10881089
</para>
10891090
<para>
1090-
The column default value, in <function>nodeToString()</function>
1091+
The column default or generation expression, in <function>nodeToString()</function>
10911092
representation. Use <literal>pg_get_expr(adbin, adrelid)</literal> to
10921093
convert it to an SQL expression.
10931094
</para></entry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy