Skip to content

Commit d61e7f1

Browse files
committed
Doc: in v12 release notes, explain how to replace uses of consrc and adsrc.
While you can find that info if you drill down far enough, it seems more helpful to put something right in the compatibility notes. Per a question from Ivan Sergio Borgonovo. Discussion: https://postgr.es/m/a6359855-2a5e-a56c-ebba-4ea46a1f0ebe@webthatworks.it
1 parent 5a6eea0 commit d61e7f1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/src/sgml/release-12.sgml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,16 @@ Author: Peter Eisentraut <peter_e@gmx.net>
15901590
linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link>.<structfield>consrc</structfield>
15911591
column (Peter Eisentraut)
15921592
</para>
1593+
1594+
<para>
1595+
This column has been deprecated for a long time, because it did not
1596+
update in response to other catalog changes (such as column renamings).
1597+
The recommended way to get a text version of a check constraint's
1598+
expression from <structname>pg_constraint</structname>
1599+
is <literal>pg_get_expr(conbin, conrelid)</literal>.
1600+
<function>pg_get_constraintdef()</function> is also a useful
1601+
alternative.
1602+
</para>
15931603
</listitem>
15941604

15951605
<listitem>
@@ -1603,6 +1613,14 @@ Author: Peter Eisentraut <peter_e@gmx.net>
16031613
linkend="catalog-pg-attrdef"><structname>pg_attrdef</structname></link>.<structfield>adsrc</structfield>
16041614
column (Peter Eisentraut)
16051615
</para>
1616+
1617+
<para>
1618+
This column has been deprecated for a long time, because it did not
1619+
update in response to other catalog changes (such as column renamings).
1620+
The recommended way to get a text version of a default-value expression
1621+
from <structname>pg_attrdef</structname> is <literal>pg_get_expr(adbin,
1622+
adrelid)</literal>.
1623+
</para>
16061624
</listitem>
16071625

16081626
<listitem>

0 commit comments

Comments
 (0)