model-writtenrun 6056 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Edmund Horner proposed completing the first SELECT-list item with function names and column names from all tables, acknowledging that the later FROM clause prevents straightforward table-specific suggestions #1.
- Vik Fearing requested inclusion of aggregates and window functions, exclusion of trigger/internal functions, and server-version checks to avoid aborting user transactions; Edmund incorporated these changes into the next patch #4 #6 #8.
- Edmund separately proposed wrapping completion queries in savepoints, but Andres Freund argued that queries should instead check server versions, and Vik opposed the savepoint approach #9 #12 #21.
- Vik identified missing nested-SELECT and ALL/DISTINCT cases, and Edmund revised the matching rules while adding a pre-8.1 query after testing older servers exposed oidvector limitations #17 #19.
- Tom Lane found the version handling too ad hoc and supplied reusable VersionedQuery and versioned SchemaQuery infrastructure, demonstrating it with function, aggregate, procedure, publication, and subscription completion #23.
- Edmund endorsed the common infrastructure; Tom considered savepoints unnecessary if queries actually support older servers and rejected a second-connection suggestion because it would miss temporary tables and uncommitted objects #25 #27 #28 #29.
- Tom committed the infrastructure from #23 with only comment refinements as 722408bcd1, then noticed that the newer function-completion condition incorrectly excluded aggregates needed by GRANT ON FUNCTION #32.
- Edmund rebuilt SELECT completion using schema-aware function queries and a column-query addon, adding addon interpolation so filtering happens before the result limit, then fixed a NULL-addon bug #33 #34.
- Tom's proposed aggregate correction from #32 landed separately as b6e132ddc8, allowing every prokind except procedures and documenting the intentional inclusion of aggregates.
- Edmund reported successful everyday use but remained concerned that roughly 1,700 possible completions in an empty database were arbitrarily truncated to 1,000, while comma completion was still separate work #36.
- Peter Eisentraut found malformed older-server queries and missing struct-field commas, and argued that catalog-membership exclusions suppressed useful functions; Edmund agreed to shift filtering toward argument and return pseudotypes #37 #38 #39.
- Heikki Linnakangas reported noisy suggestions, missing comma completion, inconsistent apparent system-column support, and approximately one-second completion latency with a thousand partitions; Joao De Almeida Pereira independently identified a missing struct-field comma #40 #41.
- Edmund supplied revised pseudotype filtering and a second patch for completion after commas, while leaving table-aware suggestions, system-column policy, set-returning-function policy, and performance concerns unresolved #42.
- Edmund later rebased both patches and fixed case sensitivity in comma completion, without otherwise changing functionality #44.
- After a three-year gap, David Fetter revived the two-patch series with another rebase and revised function filtering, noting that tests were still missing #45.
- Edmund explained the addon interpolation and comma-spacing mechanics, but Tom reiterated that excessively broad suggestions had prevented this feature from landing and pointed to src/bin/psql/t/010_tab_completion.pl; the thread ends with the infrastructure and aggregate fix committed, SELECT and comma completion uncommitted, and savepoint protection set aside #46 #47 #35.