Re: [HACKERS] Minor issues with code comments related to abbreviated keys

2015-01-23 Thread Peter Geoghegan
On Thu, Jan 22, 2015 at 5:17 PM, Peter Geoghegan p...@heroku.com wrote:
 Attached patch fixes minor issues in code comments that relate to
 abbreviated keys.

There should also be a description of hyperLogLog in the new README
file within ./src/backend/lib/

I suggest:

hyperloglog.c - a streaming cardinality estimator
-- 
Peter Geoghegan


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Minor issues with code comments related to abbreviated keys

2015-01-23 Thread Robert Haas
On Fri, Jan 23, 2015 at 2:59 PM, Peter Geoghegan p...@heroku.com wrote:
 On Thu, Jan 22, 2015 at 5:17 PM, Peter Geoghegan p...@heroku.com wrote:
 Attached patch fixes minor issues in code comments that relate to
 abbreviated keys.

 There should also be a description of hyperLogLog in the new README
 file within ./src/backend/lib/

 I suggest:

 hyperloglog.c - a streaming cardinality estimator

Committed with that addition.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Minor issues with code comments related to abbreviated keys

2015-01-22 Thread Peter Geoghegan
Attached patch fixes minor issues in code comments that relate to
abbreviated keys.

-- 
Peter Geoghegan
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index c79b641..cfa1921 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2088,7 +2088,7 @@ bttext_abbrev_convert(Datum original, SortSupport ssup)
 	 *
 	 * First, Hash key proper, or a significant fraction of it.  Mix in length
 	 * in order to compensate for cases where differences are past
-	 * CACHE_LINE_SIZE bytes, so as to limit the overhead of hashing.
+	 * PG_CACHE_LINE_SIZE bytes, so as to limit the overhead of hashing.
 	 */
 	hash = hash_any((unsigned char *) authoritative_data,
 	Min(len, PG_CACHE_LINE_SIZE));
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h
index 62fedfa..44c596f 100644
--- a/src/include/utils/sortsupport.h
+++ b/src/include/utils/sortsupport.h
@@ -165,8 +165,8 @@ typedef struct SortSupportData
 	 * may set it to NULL to indicate abbreviation should not be used (which is
 	 * something sortsupport routines need not concern themselves with).
 	 * However, sortsupport routines must not set it when it is immediately
-	 * established that abbreviation should not proceed (for abbreviation
-	 * calls, or platform-specific impediments to using abbreviation).
+	 * established that abbreviation should not proceed (e.g., for !abbreviate
+	 * calls, or due to platform-specific impediments to using abbreviation).
 	 */
 	Datum			(*abbrev_converter) (Datum original, SortSupport ssup);
 

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers