postgresql/src/backend
Alvaro Herrera 2f5c9d9c9c Tweak catalog indexing abstraction for upcoming WARM
Split the existing CatalogUpdateIndexes into two different routines,
CatalogTupleInsert and CatalogTupleUpdate, which do both the heap
insert/update plus the index update.  This removes over 300 lines of
boilerplate code all over src/backend/catalog/ and src/backend/commands.
The resulting code is much more pleasing to the eye.

Also, by encapsulating what happens in detail during an UPDATE, this
facilitates the upcoming WARM patch, which is going to add a few more
lines to the update case making the boilerplate even more boring.

The original CatalogUpdateIndexes is removed; there was only one use
left, and since it's just three lines, we can as well expand it in place
there.  We could keep it, but WARM is going to break all the UPDATE
out-of-core callsites anyway, so there seems to be no benefit in doing
so.

Author: Pavan Deolasee
Discussion: https://www.postgr.es/m/CABOikdOcFYSZ4vA2gYfs=M2cdXzXX4qGHeEiW3fu9PCfkHLa2A@mail.gmail.com
2017-01-31 18:42:24 -03:00
..
access Be more aggressive in avoiding tuple conversion. 2017-01-24 21:53:38 -05:00
bootstrap Remove dead code in bootstrap 2017-01-17 16:54:40 -03:00
catalog Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
commands Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
executor Use castNode() in a bunch of statement-list-related code. 2017-01-26 22:09:34 -05:00
foreign Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
lib Fix overflow check in StringInfo; add missing casts 2017-01-10 11:41:13 -03:00
libpq Simplify some long-obsolete code in hba.c's next_token(). 2017-01-30 18:42:41 -05:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Logical replication 2017-01-20 09:04:49 -05:00
optimizer Refactor bitmap heap scan estimation of heap pages fetched. 2017-01-27 16:28:47 -05:00
parser Use castNode() in a bunch of statement-list-related code. 2017-01-26 22:09:34 -05:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Fix typo: pg_statistics -> pg_statistic 2017-01-25 14:38:33 -05:00
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
rewrite Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
snowball Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
storage Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
tcop Improve comments about ProcessUtility's queryString parameter. 2017-01-27 10:02:04 -05:00
tsearch Move some things from builtins.h to new header files 2017-01-20 20:29:53 -05:00
utils Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Fix parallel make issue with new fmgrprotos.h 2017-01-23 15:36:27 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00