From: Mike Bayer Date: Mon, 10 Nov 2025 13:43:41 +0000 (-0500) Subject: changelog updates X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3fda75e3dbaf1a696f6747e113acf9e239f51ba;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git changelog updates Change-Id: I4e108b5a772ec49ae0f07761cadef9bf0f485297 --- diff --git a/doc/build/changelog/migration_21.rst b/doc/build/changelog/migration_21.rst index 2ef92b7db7..53d5c90ba1 100644 --- a/doc/build/changelog/migration_21.rst +++ b/doc/build/changelog/migration_21.rst @@ -1047,20 +1047,28 @@ Example of the new syntax when connected to PostgreSQL 14+:: data = table("data", column("h", HSTORE)) - # SELECT operations use subscript notation - stmt = select(data.c.h["key"]) - # Renders as: SELECT data.h['key'] FROM data + stmt1 = select(data.c.h["key"]) - # UPDATE operations also use subscript notation - stmt = update(data).values({data.c.h["status"]: "active"}) - # Renders as: UPDATE data SET h['status'] = 'active' + stmt2 = update(data).values({data.c.h["status"]: "active"}) -On PostgreSQL 13 and earlier, the same code automatically renders using the -arrow operator:: +On PostgreSQL 14 and above, the statements above would render as: - # Same code on PostgreSQL 13 renders as: - # SELECT data.h -> 'key' FROM data - # UPDATE data SET h -> 'status' = 'active' +.. sourcecode:: sql + + -- new subscript operator on PostgreSQL 14+ + SELECT data.h['key'] FROM data + + UPDATE data SET h['status'] = 'active' + +On PostgreSQL 13 and earlier, they would render using the +arrow operator: + +.. sourcecode:: sql + + -- Same code on PostgreSQL 13 renders as: + SELECT data.h -> 'key' FROM data + + UPDATE data SET h -> 'status' = 'active' Impact on Existing Indexes ^^^^^^^^^^^^^^^^^^^^^^^^^^^