Re: [PATCHES] Add missing descriptions for aggregates, functions and conversions

2008-08-23 Thread Bruce Momjian

Patch applied; always nice to beef up our descriptions, thanks.

---

Bernd Helmle wrote:
> 
> Please find attached a patch that adds some missing descriptions for 
> aggregates, functions and conversions. This will add COMMENTs to the 
> conversion sql script as well. Most of the descriptions are taken from the 
> documentation (especially for the statistic functions). I didn't bother 
> with some internal functions like text_pattern_lt, if we agree they should 
> be described as well i can add them, too.
> 
> -- 
>   Thanks
> 
> Bernd
[ Attachment, skipping... ]

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

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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


[PATCHES] Add missing descriptions for aggregates, functions and conversions

2008-07-08 Thread Bernd Helmle


Please find attached a patch that adds some missing descriptions for 
aggregates, functions and conversions. This will add COMMENTs to the 
conversion sql script as well. Most of the descriptions are taken from the 
documentation (especially for the statistic functions). I didn't bother 
with some internal functions like text_pattern_lt, if we agree they should 
be described as well i can add them, too.


--
 Thanks

   Bernd? function_descr.patch
Index: src/backend/utils/mb/conversion_procs/Makefile
===
RCS file: /projects/cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v
retrieving revision 1.19
diff -c -b -r1.19 Makefile
*** src/backend/utils/mb/conversion_procs/Makefile	18 Mar 2008 16:24:50 -	1.19
--- src/backend/utils/mb/conversion_procs/Makefile	8 Jul 2008 15:06:47 -
***
*** 175,182 
--- 175,184 
  		obj=$$1; shift; \
  		echo "-- $$se --> $$de"; \
  		echo "CREATE OR REPLACE FUNCTION $$func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$$"libdir"/$$obj', '$$func' LANGUAGE C STRICT;"; \
+ 	echo "COMMENT ON FUNCTION $$func(INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) IS 'internal conversion function for $$se to $$de';"; \
  		echo "DROP CONVERSION pg_catalog.$$name;"; \
  		echo "CREATE DEFAULT CONVERSION pg_catalog.$$name FOR '$$se' TO '$$de' FROM $$func;"; \
+ 	echo "COMMENT ON CONVERSION pg_catalog.$$name IS 'conversion for $$se to $$de';"; \
  	done > $@
  else
  	echo "-- No conversion support, for lack of shared library support" > $@
Index: src/include/catalog/pg_proc.h
===
RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_proc.h,v
retrieving revision 1.504
diff -c -b -r1.504 pg_proc.h
*** src/include/catalog/pg_proc.h	3 Jul 2008 20:58:46 -	1.504
--- src/include/catalog/pg_proc.h	8 Jul 2008 15:06:47 -
***
*** 235,241 
  DATA(insert OID =  110 (  unknownout	   PGNSP PGUID 12 1 0 f f t f i 1 2275	"705" _null_ _null_ _null_	unknownout - _null_ _null_ ));
  DESCR("I/O");
  DATA(insert OID = 111 (  numeric_fac	   PGNSP PGUID 12 1 0 f f t f i 1 1700 "20" _null_ _null_ _null_	numeric_fac - _null_ _null_ ));
! 
  DATA(insert OID = 115 (  box_above_eq	   PGNSP PGUID 12 1 0 f f t f i 2  16 "603 603" _null_ _null_ _null_	box_above_eq - _null_ _null_ ));
  DESCR("is above (allows touching)");
  DATA(insert OID = 116 (  box_below_eq	   PGNSP PGUID 12 1 0 f f t f i 2  16 "603 603" _null_ _null_ _null_	box_below_eq - _null_ _null_ ));
--- 235,241 
  DATA(insert OID =  110 (  unknownout	   PGNSP PGUID 12 1 0 f f t f i 1 2275	"705" _null_ _null_ _null_	unknownout - _null_ _null_ ));
  DESCR("I/O");
  DATA(insert OID = 111 (  numeric_fac	   PGNSP PGUID 12 1 0 f f t f i 1 1700 "20" _null_ _null_ _null_	numeric_fac - _null_ _null_ ));
! DESCR("equivalent to factorial");
  DATA(insert OID = 115 (  box_above_eq	   PGNSP PGUID 12 1 0 f f t f i 2  16 "603 603" _null_ _null_ _null_	box_above_eq - _null_ _null_ ));
  DESCR("is above (allows touching)");
  DATA(insert OID = 116 (  box_below_eq	   PGNSP PGUID 12 1 0 f f t f i 2  16 "603 603" _null_ _null_ _null_	box_below_eq - _null_ _null_ ));
***
*** 3220,3340 
--- 3220,3444 
  /* Aggregates (moved here from pg_aggregate for 7.3) */
  
  DATA(insert OID = 2100 (  avgPGNSP PGUID 12 1 0 t f f f i 1 1700 "20" _null_ _null_ _null_  aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as numeric of all bigint values");
  DATA(insert OID = 2101 (  avgPGNSP PGUID 12 1 0 t f f f i 1 1700 "23" _null_ _null_ _null_  aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as numeric of all integer values");
  DATA(insert OID = 2102 (  avgPGNSP PGUID 12 1 0 t f f f i 1 1700 "21" _null_ _null_ _null_  aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as numeric of all smallint values");
  DATA(insert OID = 2103 (  avgPGNSP PGUID 12 1 0 t f f f i 1 1700 "1700" _null_ _null_ _null_ aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as numeric of all numeric values");
  DATA(insert OID = 2104 (  avgPGNSP PGUID 12 1 0 t f f f i 1 701 "700" _null_ _null_ _null_  aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as float8 of all float4 values");
  DATA(insert OID = 2105 (  avgPGNSP PGUID 12 1 0 t f f f i 1 701 "701" _null_ _null_ _null_  aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as float8 of all float8 values");
  DATA(insert OID = 2106 (  avgPGNSP PGUID 12 1 0 t f f f i 1 1186 "1186" _null_ _null_ _null_ aggregate_dummy - _null_ _null_ ));
+ DESCR("the average (arithmetic mean) as interval of all interval values");
  
  DATA(insert OID = 2107 (  sumPGNSP PGUID 12 1 0 t f f f i 1 1700 "20" _null_ _null_ _null_  aggregate_dummy - _null_ _null