git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 1573995) | patch
Fix pg_get_indexdef()'s behavior for included index columns.
2018年7月19日 17:48:05 +0000 (13:48 -0400)
2018年7月19日 18:53:48 +0000 (14:53 -0400)
commit 028e3da2949482fa56f3ffdbda840782f2953b0b
Fix pg_get_indexdef()'s behavior for included index columns.

The multi-argument form of pg_get_indexdef() failed to print anything when
asked to print a single index column that is an included column rather than
a key column. This seems an unintentional result of someone having tried
to take a short-cut and use the attrsOnly flag for two different purposes.
To fix, split said flag into two flags, attrsOnly which suppresses
non-attribute info, and keysOnly which suppresses included columns.
Add a test case using psql's \d command, which relies on that function.

(It's mighty tempting at this point to replace pg_get_indexdef_worker's
mess of boolean flag arguments with a single bitmask-of-flags argument,
which would allow making the call sites much more self-documenting.
But I refrained for the moment.)

Discussion: https://postgr.es/m/21724.1531943735@sss.pgh.pa.us
src/backend/utils/adt/ruleutils.c diff | blob | blame | history
src/test/regress/expected/index_including.out diff | blob | blame | history
src/test/regress/sql/index_including.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /