postgresql/src
Nathan Bossart a3e6beba60 pgindent: Fix spacing after != when member name matches typedef.
When a struct member name matches a registered typedef, pgindent
removes the space after "!=" (and some other operators), like so:

    entry->dsh.dsa_handle !=DSA_HANDLE_INVALID

The problem is that the related code in lexi.c sets last_u_d to
true before jumping to found_typename, causing the next operator to
be classified as unary and suppressing the following space.  This
is correct for type names, but not for struct members.  For
example, "Datum *x" needs "*" to be unary to suppress the space
before "x".  To fix, only set last_u_d before jumping to
found_typename if the typedef name doesn't appear after "." or
"->".

Note that this does not bump INDENT_VERSION.  We'll do that just
once after some other changes to pg_bsd_indent are committed.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aS9hkwnkWf3dZIA_%40nathan
2026-05-13 09:10:50 -05:00
..
backend Fix FOR PORTION OF with non-updatable view columns 2026-05-13 13:44:28 +02:00
bin psql: save/restore truePrint/falsePrint printQueryOpt values 2026-05-12 18:28:20 -04:00
common Fix assorted places that need to use palloc_array(). 2026-05-11 05:13:46 -07:00
fe_utils Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:47 -07:00
include Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:47 -07:00
interfaces Mark PQfn() unsafe and fix overrun in frontend LO interface. 2026-05-11 05:13:47 -07:00
makefiles Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
pl Harmonize function parameter names for Postgres 19. 2026-04-22 12:47:19 -04:00
port Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:47 -07:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Fix FOR PORTION OF with non-updatable view columns 2026-05-13 13:44:28 +02:00
timezone Guard against unsafe conditions in usage of pg_strftime(). 2026-05-11 05:13:46 -07:00
tools pgindent: Fix spacing after != when member name matches typedef. 2026-05-13 09:10:50 -05:00
tutorial Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore
DEVELOPERS
Makefile Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
Makefile.global.in Update Unicode data to CLDR 48.2 2026-04-13 11:13:36 +02:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00