From 1e0b4365c22c9f8a1bc7a5f8339f770c767b402f Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 10 Nov 2014 15:56:08 -0300 Subject: [PATCH] Further code and wording tweaks in BRIN Besides a couple of typo fixes, per David Rowley, Thom Brown, and Amit Langote, and mentions of BRIN in the general CREATE INDEX page again per David, this includes silencing MSVC compiler warnings (thanks Microsoft) and an additional variable initialization per Coverity scanner. --- doc/src/sgml/brin.sgml | 2 +- doc/src/sgml/ref/create_index.sgml | 9 +++++---- src/backend/access/brin/README | 2 +- src/backend/access/brin/brin.c | 8 +++++--- src/backend/access/brin/brin_tuple.c | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml index 03d1fd62783..1ac282c57a6 100644 --- a/doc/src/sgml/brin.sgml +++ b/doc/src/sgml/brin.sgml @@ -64,7 +64,7 @@ Built-in Operator Classes - The core PostgreSQL distribution includes + The core PostgreSQL distribution includes the BRIN operator classes shown in . diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index ead33750fa2..18bd0d33704 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -57,8 +57,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] PostgreSQL provides the index methods - B-tree, hash, GiST, SP-GiST, and GIN. Users can also define their own index - methods, but that is fairly complicated. + B-tree, hash, GiST, SP-GiST, GIN, and BRIN. Users can also define their own + index methods, but that is fairly complicated. @@ -166,7 +166,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] The name of the index method to be used. Choices are btree, hash, - gist, spgist and gin. + gist, spgist, gin, and + brin. The default method is btree. @@ -492,7 +493,7 @@ Indexes: - Currently, only the B-tree, GiST and GIN index methods support + Currently, only the B-tree, GiST, GIN, and BRIN index methods support multicolumn indexes. Up to 32 fields can be specified by default. (This limit can be altered when building PostgreSQL.) Only B-tree currently diff --git a/src/backend/access/brin/README b/src/backend/access/brin/README index 2619be8db56..636d96545b2 100644 --- a/src/backend/access/brin/README +++ b/src/backend/access/brin/README @@ -126,7 +126,7 @@ that page range is complete and new tuples belong in a new page range that hasn't yet been summarized. Those insertions do not create a new index entry; instead, the page range remains unsummarized until later. -Wehn VACUUM is run on the table, all unsummarized page ranges are +Whenever VACUUM is run on the table, all unsummarized page ranges are summarized. This action can also be invoked by the user via brin_summarize_new_values(). Both these procedures scan all the unsummarized ranges, and create a summary tuple. Again, this includes the diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index ae655497951..bd35cf6696a 100644 --- a/src/backend/access/brin/brin.c +++ b/src/backend/access/brin/brin.c @@ -107,9 +107,11 @@ brininsert(PG_FUNCTION_ARGS) BrinMemTuple *dtup; BlockNumber heapBlk; int keyno; - BrinTuple *tmptup PG_USED_FOR_ASSERTS_ONLY; - BrinMemTuple *tmpdtup PG_USED_FOR_ASSERTS_ONLY; - Size tmpsiz PG_USED_FOR_ASSERTS_ONLY; +#ifdef USE_ASSERT_CHECKING + BrinTuple *tmptup; + BrinMemTuple *tmpdtup; + Size tmpsiz; +#endif CHECK_FOR_INTERRUPTS(); diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c index d895cb715cb..af649c00afc 100644 --- a/src/backend/access/brin/brin_tuple.c +++ b/src/backend/access/brin/brin_tuple.c @@ -95,7 +95,7 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, BrinTuple *rettuple; int keyno; int idxattno; - uint16 phony_infomask; + uint16 phony_infomask = 0; bits8 *phony_nullbitmap; Size len, hoff, -- 2.39.5