]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Document support of column list of ON DELETE SET actions for PostgreSQL
authorDenis Laxalde <denis@laxalde.org>
Thu, 13 Mar 2025 07:31:12 +0000 (08:31 +0100)
committerDenis Laxalde <denis@laxalde.org>
Thu, 13 Mar 2025 07:31:12 +0000 (08:31 +0100)
doc/build/core/constraints.rst

index c63ad858e2c4d17d3d0d257d2e10ff828d9900b8..1d8d4990df66a0947e886baa9de9a638765064ef 100644 (file)
@@ -311,6 +311,11 @@ arguments. The value is any string which will be output after the appropriate
 Note that these clauses require ``InnoDB`` tables when used with MySQL.
 They may also not be supported on other databases.
 
+On PostgreSQL, the ``SET NULL`` and ``SET DEFAULT`` actions of ``ON DELETE``
+clause also accept a list of columns to cascade on; e.g., ``ON DELETE SET NULL
+(note_id)``. Otherwise, all columns in the foreign key constraint are normally
+considered.
+
 .. seealso::
 
     For background on integration of ``ON DELETE CASCADE`` with