Home Explore Blog CI



postgresql

16th chunk of `doc/src/sgml/release-18.sgml`
f03d8eec3046166c9e92190ff32d6ffa775b586bc5e7e5d80000000100000fa5

-->

<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 <jdavis@postgresql.org>
2025-03-25 [650ab8aaf] Stats: use schemaname/relname instead of regclass.
-->

<listitem>
<para>
Add functions to modify per-relation and per-column optimizer statistics (Corey Huinker)
<ulink url="&commit_baseurl;e839c8ecc">&sect;</ulink>
<ulink url="&commit_baseurl;d32d14639">&sect;</ulink>
<ulink url="&commit_baseurl;650ab8aaf">&sect;</ulink>
</para>

<para>
The functions are pg_restore_relation_stats(), pg_restore_attribute_stats(), pg_clear_relation_stats(), and pg_clear_attribute_stats.
</para>
</listitem>


<!--
Author: Thomas Munro <tmunro@postgresql.org>
2025-04-08 [f78ca6f3e] Introduce file_copy_method setting.
-->

<listitem>
<para>
Add server variable file_copy_method to control the file copying method (Nazir Bilal Yavuz)
<ulink url="&commit_baseurl;f78ca6f3e">&sect;</ulink>
</para>

<para>
This controls whether CREATE DATABASE ... STRATEGY=FILE_COPY and ALTER DATABASE ... SET TABLESPACE uses file copy or clone.
</para>
</listitem>

    </itemizedlist>

    <sect4 id="release-18-constraints">
     <title><link linkend="ddl-constraints">Constraints</link></title>

      <itemizedlist>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2024-09-17 [fc0438b4e] Add temporal PRIMARY KEY and UNIQUE constraints
-->

<listitem>
<para>
Allow the specification of non-overlapping PRIMARY KEY and UNIQUE constraints (Paul A. Jungwirth)
<ulink url="&commit_baseurl;fc0438b4e">&sect;</ulink>
</para>

<para>
This is specified by WITHOUT OVERLAPS on the last column.
</para>
</listitem>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2025-01-11 [ca87c415e] Add support for NOT ENFORCED in CHECK constraints
Author: Peter Eisentraut <peter@eisentraut.org>
2025-04-02 [eec0040c4] Add support for NOT ENFORCED in foreign key constraints
-->

<listitem>
<para>
Allow CHECK and foreign key constraints to be specified as NOT ENFORCED (Amul Sul)
<ulink url="&commit_baseurl;ca87c415e">&sect;</ulink>
<ulink url="&commit_baseurl;eec0040c4">&sect;</ulink>
</para>

<para>
This also adds column pg_constraint.conenforced.
</para>
</listitem>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2024-11-15 [9321d2fdf] Fix collation handling for foreign keys
-->

<listitem>
<para>
Require primary/foreign key relationships to use either deterministic collations or the the same nondeterministic collations (Peter Eisentraut)
<ulink url="&commit_baseurl;9321d2fdf">&sect;</ulink>
</para>

<para>
The restore of a pg_dump, also used by pg_upgrade, will fail if these requirements are not met;  schema changes must be made for these upgrade methods to succeed.
</para>
</listitem>

<!--
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
2024-11-08 [14e87ffa5] Add pg_constraint rows for not-null constraints
-->

<listitem>
<para>
Store column NOT NULL specifications in pg_constraint (Álvaro Herrera, Bernd Helmle)
<ulink url="&commit_baseurl;14e87ffa5">&sect;</ulink>
</para>

<para>
This allows names to be specified for NOT NULL constraint.  This also adds

Title: PostgreSQL 18: Utility Command Enhancements and Constraint Improvements
Summary
This section covers further utility command updates including the addition of the PG_UNICODE_FAST collation provider, the ability to VACUUM and ANALYZE partitioned tables without children using the ONLY option, functions for modifying optimizer statistics (pg_restore/clear_relation/attribute_stats), and a file_copy_method server variable. It also details constraint improvements such as non-overlapping PRIMARY KEYs/UNIQUE constraints, NOT ENFORCED specification for CHECK/foreign key constraints, collation handling for foreign keys, and storing NOT NULL specifications in pg_constraint.