Home Explore Blog CI



postgresql

15th chunk of `doc/src/sgml/release-18.sgml`
c0897efd59a0d2e00e3cf15f4d203b134076b4c4d00be8540000000100000fa5
 url="&commit_baseurl;6c2b5edec">&sect;</ulink>
<ulink url="&commit_baseurl;73eba5004">&sect;</ulink>
</para>

<para>
Also report in new columns of pg_stat_subscription_stats.
</para>
</listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3 id="release-18-utility">
    <title>Utility Commands</title>

    <itemizedlist>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2025-02-07 [83ea6c540] Virtual generated columns
Author: Peter Eisentraut <peter@eisentraut.org>
2025-03-28 [cdc168ad4] Add support for not-null constraints on virtual generate
Author: Richard Guo <rguo@postgresql.org>
2025-02-25 [1e4351af3] Expand virtual generated columns in the planner
-->

<listitem>
<para>
Allow generated columns to be virtual, and make them the default (Peter Eisentraut, Jian He, Richard Guo, Dean Rasheed)
<ulink url="&commit_baseurl;83ea6c540">&sect;</ulink>
<ulink url="&commit_baseurl;cdc168ad4">&sect;</ulink>
<ulink url="&commit_baseurl;1e4351af3">&sect;</ulink>
</para>

<para>
Virtual generated columns generate their values when the columns are read, not written.  The write behavior can still be specified via the STORED option.
</para>
</listitem>

<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
2025-01-16 [80feb727c] Add OLD/NEW support to RETURNING in DML queries.
-->

<listitem>
<para>
Add OLD/NEW support to RETURNING in DML queries (Dean Rasheed)
<ulink url="&commit_baseurl;80feb727c">&sect;</ulink>
</para>

<para>
Previously RETURNING only returned new values for INSERT and UPDATE, and old values for DELETE; MERGE would return the appropriate value for the internal query executed.  This new syntax
allows the RETURNING list of INSERT/UPDATE/DELETE/MERGE to explicitly return old and new values by using the special aliases "old" and "new".  These aliases can be renamed to
avoid identifier conflicts.
</para>
</listitem>

<!--
Author: Michael Paquier <michael@paquier.xyz>
2025-02-19 [302cf1575] Add support for LIKE in CREATE FOREIGN TABLE
-->

<listitem>
<para>
Allow foreign tables to be created like existing local tables (Zhang Mingli)
<ulink url="&commit_baseurl;302cf1575">&sect;</ulink>
</para>

<para>
The syntax is CREATE FOREIGN TABLE ... LIKE.
</para>
</listitem>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2024-11-27 [85b7efa1c] Support LIKE with nondeterministic collations
-->

<listitem>
<para>
Allow LIKE with nondeterministic collations (Peter Eisentraut)
<ulink url="&commit_baseurl;85b7efa1c">&sect;</ulink>
</para>
</listitem>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2025-02-21 [329304c90] Support text position search functions with nondetermini
-->

<listitem>
<para>
Allow text position search functions with nondeterministic collations (Peter Eisentraut)
<ulink url="&commit_baseurl;329304c90">&sect;</ulink>
</para>

<para>
These used to generate an error.
</para>
</listitem>

<!--
Author: Jeff Davis <jdavis@postgresql.org>
2025-01-17 [d3d098316] Support PG_UNICODE_FAST locale in the builtin collation
-->

<listitem>
<para>
Add builtin collation provider PG_UNICODE_FAST (Jeff Davis)
<ulink url="&commit_baseurl;d3d098316">&sect;</ulink>
</para>

<para>
This locale supports case mapping, but sorts in code point order, not natural language order.
</para>
</listitem>

<!--
Author: David Rowley <drowley@postgresql.org>
2024-09-24 [62ddf7ee9] Add ONLY support for VACUUM and ANALYZE
-->

<listitem>
<para>
Allow VACUUM and ANALYZE to process partitioned tables without processing their children (Michael Harris)
<ulink url="&commit_baseurl;62ddf7ee9">&sect;</ulink>
</para>

<para>
This is enabled with the new ONLY option.  This is useful since autovacuum does not process partitioned tables, just its children.
</para>
</listitem>

<!--
Author: Jeff Davis <jdavis@postgresql.org>
2024-10-11 [e839c8ecc] Create functions pg_set_relation_stats, pg_clear_relatio
Author: Jeff Davis <jdavis@postgresql.org>
2024-10-24 [d32d14639] Add functions pg_restore_relation_stats(), pg_restore_at
Author: Jeff Davis

Title: PostgreSQL 18: Utility Commands - Generated Columns, RETURNING, Foreign Tables, and More
Summary
This section describes enhancements to utility commands in PostgreSQL 18. Key features include making generated columns virtual by default, adding OLD/NEW support to RETURNING in DML queries, allowing the creation of foreign tables like existing local tables, supporting LIKE with nondeterministic collations, allowing text position search functions with nondeterministic collations, adding a builtin collation provider PG_UNICODE_FAST, and enabling VACUUM and ANALYZE to process partitioned tables without processing their children using the ONLY option. Also included are additions for relation statistics management.