本節提供了 PostgreSQL 的數學運算方式。對於沒有標準數學約定的型別（例如，日期/時間型別），我們將在後續部分中介紹具體的行為。
random()function uses a simple linear congruential algorithm. It is fast but not suitable for cryptographic applications; see the pgcrypto module for a more secure alternative. If
setseed()is called, the results of subsequent
random()calls in the current session are repeatable by re-issuing
setseed()with the same argument.
Table 9.7 shows the available trigonometric functions. All these functions take arguments and return values of type
double precision. Each of the trigonometric functions comes in two variants, one that measures angles in radians and one that measures angles in degrees.
Another way to work with angles measured in degrees is to use the unit transformation functions
degrees()shown earlier. However, using the degree-based trigonometric functions is preferred, as that way avoids round-off error for special cases such as