You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Clarify documentation of ceil/ceiling/floor functions.
Document these as "nearest integer >= argument" and "nearest integer <=argument", which will hopefully be less confusing than the old formulation.New wording is from Matlab via Dean Rasheed.I changed the pg_description entries as well as the SGML docs. In theback branches, this will only affect installations initdb'd in the future,but it should be harmless otherwise.Discussion: <CAEZATCW3yzJo-NMSiQs5jXNFbTsCEftZS-Og8=FvFdiU+kYuSA@mail.gmail.com>
Copy file name to clipboardExpand all lines: src/include/catalog/pg_proc.h
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -411,11 +411,11 @@ DESCR("round to nearest integer");
411
411
DATA(insert OID = 229 ( dtrunc PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 701 "701" _null_ _null_ _null_ _null_ _null_dtrunc _null_ _null_ _null_ ));
412
412
DESCR("truncate to integer");
413
413
DATA(insert OID = 2308 ( ceil PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 701 "701" _null_ _null_ _null_ _null_ _null_dceil _null_ _null_ _null_ ));
414
-
DESCR("smallest integer >= value");
414
+
DESCR("nearest integer >= value");
415
415
DATA(insert OID = 2320 ( ceiling PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 701 "701" _null_ _null_ _null_ _null_ _null_dceil _null_ _null_ _null_ ));
416
-
DESCR("smallest integer >= value");
416
+
DESCR("nearest integer >= value");
417
417
DATA(insert OID = 2309 ( floor PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 701 "701" _null_ _null_ _null_ _null_ _null_dfloor _null_ _null_ _null_ ));
418
-
DESCR("largest integer <= value");
418
+
DESCR("nearest integer <= value");
419
419
DATA(insert OID = 2310 ( sign PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 701 "701" _null_ _null_ _null_ _null_ _null_dsign _null_ _null_ _null_ ));
420
420
DESCR("sign of value");
421
421
DATA(insert OID = 230 ( dsqrt PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 701 "701" _null_ _null_ _null_ _null_ _null_dsqrt _null_ _null_ _null_ ));
@@ -2318,11 +2318,11 @@ DESCR("value truncated to 'scale'");
2318
2318
DATA(insert OID = 1710 ( truncPGNSP PGUID 14 1 0 0 0 f f f f t f i 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ "select pg_catalog.trunc($1,0)" _null_ _null_ _null_ ));
2319
2319
DESCR("value truncated to 'scale' of zero");
2320
2320
DATA(insert OID = 1711 ( ceilPGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ numeric_ceil _null_ _null_ _null_ ));
2321
-
DESCR("smallest integer >= value");
2321
+
DESCR("nearest integer >= value");
2322
2322
DATA(insert OID = 2167 ( ceilingPGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ numeric_ceil _null_ _null_ _null_ ));
2323
-
DESCR("smallest integer >= value");
2323
+
DESCR("nearest integer >= value");
2324
2324
DATA(insert OID = 1712 ( floorPGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ numeric_floor _null_ _null_ _null_ ));
2325
-
DESCR("largest integer <= value");
2325
+
DESCR("nearest integer <= value");
2326
2326
DATA(insert OID = 1718 ( numeric_eqPGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "1700 1700" _null_ _null_ _null_ _null_ _null_ numeric_eq _null_ _null_ _null_ ));
2327
2327
DATA(insert OID = 1719 ( numeric_nePGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "1700 1700" _null_ _null_ _null_ _null_ _null_ numeric_ne _null_ _null_ _null_ ));
2328
2328
DATA(insert OID = 1720 ( numeric_gtPGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "1700 1700" _null_ _null_ _null_ _null_ _null_ numeric_gt _null_ _null_ _null_ ));