Fix universal builds on MacOS

John NaylorDiscussion: 223EA201-A0E8-4A13-B220-EB903E8DF817

This commit addresses an issue where universal builds on macOS would error out due to the assumption that the CPUID instruction was always available. It now zeros out the info instead of causing an error when the instruction is not present.


Enforce RETURNING typmod for empty-set JSON_ARRAY(query)

Richard Guo

This commit fixes a compliance issue with the SQL/JSON standard where JSON_ARRAY(query) would bypass length restrictions from the RETURNING clause when the subquery yielded no rows. The empty-array constant used as a fallback now correctly enforces typmod restrictions.


Use schema-qualified names in EXCEPT clause error messages.

Amit Kapila

This commit improves error messages in check_publication_add_relation() by using schema-qualified relation names. Previously, only the relation name was reported, which could be ambiguous if the same name existed in multiple schemas.


postgres_fdw: Fix syntax error in fetch_attstats().

Etsuro Fujita

This commit corrects a syntax error in fetch_attstats() for postgres_fdw when importing remote statistics from pre-v17 servers. A trailing comma after NULL placeholders in the SELECT list caused issues, which has now been removed.


Consider opfamily and collation when removing redundant GROUP BY columns

Richard Guo

This commit enhances remove_useless_groupby_columns() by considering opfamily and collation when identifying functionally dependent GROUP BY columns. Previously, only attno was used, which could lead to incorrect column removal when different equality notions or collations were involved.


Fix HAVING-to-WHERE pushdown for simple-CASE form

Richard Guo

This commit fixes an issue with HAVING-to-WHERE pushdown where the simple-CASE form was not correctly handled when checking for collation conflicts. The exprInputCollation() walker now correctly identifies the comparison collation for simple-CASE expressions.


doc PG 19 relnotes: add UTF-8 case folding performance item

Bruce MomjianDiscussion: 9dae1593-4441-4a20-a1ab-ce5018db9878

This commit updates the PostgreSQL 19 release notes to include an item regarding UTF-8 case folding performance.


Fix use-after-free of qs in AfterTriggerEndQuery.

Amit Langote

This commit resolves a use-after-free bug in AfterTriggerEndQuery() that occurred when afterTriggerInvokeEvents() repallocated afterTriggers.query_stack. The fix ensures qs is recomputed before FireAfterTriggerBatchCallbacks() to prevent dereferencing freed pointers.


doc PG 19 relnotes: correct two items

Bruce MomjianDiscussion: CACJufxG_ZTCTtFMxKiVji-s10jHt99krfH+Kn+Ww2prF=X6g6Q

This commit provides corrections for two existing items within the PostgreSQL 19 release notes.


HN News

5x perf increase on writes with FPW disabled in Postgres

Score: 2 / Comments: 0

This article discusses how disabling Full Page Writes (FPW) can lead to a significant performance increase on writes in PostgreSQL, specifically within a Lakehouse architecture context.


Unique index failure on Postgres – my bad

Score: 2 / Comments: 0

A Hacker News discussion reflecting on a user's experience with a unique index failure in PostgreSQL, concluding with the author acknowledging their own mistake in implementation or understanding.


Show HN: Vpg – Pglite for Native Code

Score: 1 / Comments: 0

This Show Hacker News submission introduces Vpg, a project aimed at providing a Pglite-like experience for native code, facilitating easier PostgreSQL integration in native applications.


PostgreSQL's Aggregate Filter Will Spoil You

Score: 1 / Comments: 0

An article highlighting the utility and convenience of PostgreSQL's aggregate filter feature, suggesting it can significantly simplify complex queries and improve developer experience.


Summary

Today's PostgreSQL news includes several important bug fixes across the codebase, addressing issues from macOS universal builds and SQL/JSON compliance to postgres_fdw syntax errors and query optimizer logic. Additionally, there are updates to the PG 19 release notes. Hacker News features discussions on PostgreSQL write performance, unique index failures, a new tool for native code, and the benefits of aggregate filters.


This digest was generated by gemini based on Hacker News, GitHub, and the PostgreSQL mailing list.