From da486d360103fbb3cd0d3f3b70134d47e9bb652a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 1 Jul 2024 08:39:07 +0200 Subject: [PATCH] doc: Clarify that pg_attrdef also stores generation expressions This was documented with pg_attribute but not with pg_attrdef. Reported-by: jian he Discussion: https://www.postgresql.org/message-id/CACJufxE+E-iYmBnZVZHiYA+WpyZZVv7BfiBLpo=T70EZHDU9rw@mail.gmail.com --- doc/src/sgml/catalogs.sgml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index dd61e057b21..b654fae1b2f 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1032,10 +1032,11 @@ The catalog pg_attrdef stores column default - values. The main information about columns is stored in - pg_attribute. - Only columns for which a default value has been explicitly set will have - an entry here. + expressions and generation expressions. The main information about columns + is stored in pg_attribute. + Only columns for which a default expression or generation expression has + been explicitly set will have an entry here. @@ -1087,7 +1088,7 @@ adbinpg_node_tree - The column default value, in nodeToString() + The column default or generation expression, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression. -- 2.30.2