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 the
back 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-6
Original file line number
Diff line number
Diff line change
@@ -416,11 +416,11 @@ DESCR("round to nearest integer");
416
416
DATA(insert OID = 229 ( dtrunc PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 701 "701" _null_ _null_ _null_ _null_ _null_ dtrunc _null_ _null_ _null_ ));
417
417
DESCR("truncate to integer");
418
418
DATA(insert OID = 2308 ( ceil PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 701 "701" _null_ _null_ _null_ _null_ _null_ dceil _null_ _null_ _null_ ));
419
-
DESCR("smallest integer >= value");
419
+
DESCR("nearest integer >= value");
420
420
DATA(insert OID = 2320 ( ceiling PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 701 "701" _null_ _null_ _null_ _null_ _null_ dceil _null_ _null_ _null_ ));
421
-
DESCR("smallest integer >= value");
421
+
DESCR("nearest integer >= value");
422
422
DATA(insert OID = 2309 ( floor PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 701 "701" _null_ _null_ _null_ _null_ _null_ dfloor _null_ _null_ _null_ ));
423
-
DESCR("largest integer <= value");
423
+
DESCR("nearest integer <= value");
424
424
DATA(insert OID = 2310 ( sign PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 701 "701" _null_ _null_ _null_ _null_ _null_ dsign _null_ _null_ _null_ ));
425
425
DESCR("sign of value");
426
426
DATA(insert OID = 230 ( dsqrt PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 701 "701" _null_ _null_ _null_ _null_ _null_ dsqrt _null_ _null_ _null_ ));
@@ -2249,11 +2249,11 @@ DESCR("value truncated to 'scale'");
2249
2249
DATA(insert OID = 1710 ( trunc PGNSP PGUID 14 1 0 0 0 f f f f t f i s 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ "select pg_catalog.trunc($1,0)" _null_ _null_ _null_ ));
2250
2250
DESCR("value truncated to 'scale' of zero");
2251
2251
DATA(insert OID = 1711 ( ceil PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ numeric_ceil _null_ _null_ _null_ ));
2252
-
DESCR("smallest integer >= value");
2252
+
DESCR("nearest integer >= value");
2253
2253
DATA(insert OID = 2167 ( ceiling PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ numeric_ceil _null_ _null_ _null_ ));
2254
-
DESCR("smallest integer >= value");
2254
+
DESCR("nearest integer >= value");
2255
2255
DATA(insert OID = 1712 ( floor PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 1700 "1700" _null_ _null_ _null_ _null_ _null_ numeric_floor _null_ _null_ _null_ ));
2256
-
DESCR("largest integer <= value");
2256
+
DESCR("nearest integer <= value");
2257
2257
DATA(insert OID = 1718 ( numeric_eq PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 16 "1700 1700" _null_ _null_ _null_ _null_ _null_ numeric_eq _null_ _null_ _null_ ));
2258
2258
DATA(insert OID = 1719 ( numeric_ne PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 16 "1700 1700" _null_ _null_ _null_ _null_ _null_ numeric_ne _null_ _null_ _null_ ));
2259
2259
DATA(insert OID = 1720 ( numeric_gt PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 16 "1700 1700" _null_ _null_ _null_ _null_ _null_ numeric_gt _null_ _null_ _null_ ));
0 commit comments