1/12/2024 0 Comments Postgres round function![]() Power ( a double precision, b double precision ) → double precision Remainder of y/ x available for smallint, integer, bigint, and numeric Mod ( y numeric_type, x numeric_type ) → numeric_type Minimum scale (number of fractional decimal digits) needed to represent the supplied value precisely Log10 ( double precision ) → double precision Log ( double precision ) → double precision Ln ( double precision ) → double precision Least common multiple (the smallest strictly positive number that is an integral multiple of both inputs) returns 0 if either input is zero available for integer, bigint, and numeric ![]() Lcm ( numeric_type, numeric_type ) → numeric_type ![]() Greatest common divisor (the largest positive number that divides both inputs with no remainder) returns 0 if both inputs are zero available for integer, bigint, and numeric Gcd ( numeric_type, numeric_type ) → numeric_type Nearest integer less than or equal to argument Integer quotient of y/ x (truncates towards zero)Įrf ( double precision ) → double precisionĮrfc ( double precision ) → double precisionĬomplementary error function ( 1 - erf(x), without loss of precision for large inputs)Įxp ( double precision ) → double precisionĮxponential ( e raised to the given power)įloor ( double precision ) → double precision Nearest integer greater than or equal to argument (same as ceil)ĭegrees ( double precision ) → double precision Nearest integer greater than or equal to argumentĬeiling ( double precision ) → double precision The functions working with double precision data are mostly implemented on top of the host system's C library accuracy and behavior in boundary cases can therefore vary depending on the host system.Ĭbrt ( double precision ) → double precisionĬeil ( double precision ) → double precision Except where noted, any given form of a function returns the same data type as its argument(s) cross-type cases are resolved in the same way as explained above for operators. Many of these functions are provided in multiple forms with different argument types. Table 9.5 shows the available mathematical functions. Integral_type # integral_type → integral_type Integral_type | integral_type → integral_type Integral_type & integral_type → integral_type Unlike typical mathematical practice, multiple uses of ^ will associate left to right by default: Modulo (remainder) available for smallint, integer, bigint, and numericĭouble precision ^ double precision → double precision Numeric_type % numeric_type → numeric_type Numeric_type / numeric_type → numeric_typeĭivision (for integral types, division truncates the result towards zero) Numeric_type * numeric_type → numeric_type Numeric_type - numeric_type → numeric_type What is the CEILING Function in PostgreSQL?Īs we mentioned earlier, the CEILING function is a PostgreSQL numeric function that’s used to return the nearest integer greater than or equal to the given argument.Numeric_type + numeric_type → numeric_type Windows and Linux users can download PostgreSQL here. The service should be running in the background. If you’re planning to follow along with the examples we’ll show in this tutorial, you’ll need to make sure you have PostgreSQL server installed and configured on your machine. We’ll look at a few examples of this function to get a better idea of how it’s used. In this article, we’ll focus on the CEILING function in PostgreSQL, which is used to get the nearest value that is greater than or equal to a specified argument. If you’re using PostgreSQL to store and manage your data, you’ll quickly find out that there are many functions available to evaluate and manipulate numerical data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |