Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9a990d

Browse files
committed
Add exp(), ln(), and some other functions to numeric-functions table.
1 parent339fe3c commitb9a990d

File tree

1 file changed

+54
-10
lines changed

1 file changed

+54
-10
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,23 @@
4141
<entry> COALESCE(<replaceable class="parameter">list</replaceable>) </entry>
4242
<entry> non-NULL </entry>
4343
<entry> return first non-NULL value in list </entry>
44-
<entry> COALESCE(<replaceable class="parameter">r"</replaceable>le>, <replaceable
45-
class="parameter">c2</replaceable> + 5, 0) </entry>
44+
<entry> COALESCE(rle, c2 + 5, 0) </entry>
4645
</row>
4746
<row>
4847
<entry> NULLIF(<replaceable class="parameter">input</replaceable>,<replaceable class="parameter">value</replaceable>) </entry>
4948
<entry> <replaceable class="parameter">input</replaceable> or NULL </entry>
50-
<entry> return NULL if <replaceable class="parameter">input</replaceable> = <replaceable class="parameter">value</replaceable> </entry>
51-
<entry> NULLIF(<replaceable class="parameter">c1</replaceable>, 'N/A')</entry>
49+
<entry> return NULL if
50+
<replaceable class="parameter">input</replaceable> =
51+
<replaceable class="parameter">value</replaceable>,
52+
else <replaceable class="parameter">input</replaceable>
53+
</entry>
54+
<entry> NULLIF(c1, 'N/A') </entry>
5255
</row>
5356
<row>
5457
<entry> CASE WHEN <replaceable class="parameter">expr</replaceable> THEN <replaceable class="parameter">expr</replaceable> [...] ELSE <replaceable class="parameter">expr</replaceable> END </entry>
5558
<entry> <replaceable class="parameter">expr</replaceable> </entry>
56-
<entry> return expression for first true clause </entry>
57-
<entry> CASE WHEN<replaceable class="parameter">c1</replaceable> = 1 THEN 'match' ELSE 'no match' END </entry>
59+
<entry> return expression for first trueWHENclause </entry>
60+
<entry> CASE WHENc1 = 1 THEN 'match' ELSE 'no match' END </entry>
5861
</row>
5962
</tbody>
6063
</tgroup>
@@ -79,16 +82,52 @@
7982
</thead>
8083
<tbody>
8184
<row>
82-
<entry> dexp(float8) </entry>
85+
<entry> abs(float8) </entry>
86+
<entry> float8 </entry>
87+
<entry> absolute value </entry>
88+
<entry> abs(-17.4) </entry>
89+
</row>
90+
<row>
91+
<entry> sqrt(float8) </entry>
92+
<entry> float8 </entry>
93+
<entry> square root </entry>
94+
<entry> sqrt(2.0) </entry>
95+
</row>
96+
<row>
97+
<entry> exp(float8) </entry>
8398
<entry> float8 </entry>
8499
<entry> raise e to the specified exponent </entry>
85-
<entry>dexp(2.0) </entry>
100+
<entry>exp(2.0) </entry>
86101
</row>
87102
<row>
88-
<entry> dpow(float8,float8) </entry>
103+
<entry> ln(float8) </entry>
104+
<entry> float8 </entry>
105+
<entry> natural logarithm </entry>
106+
<entry> ln(2.0) </entry>
107+
</row>
108+
<row>
109+
<entry> log(float8) </entry>
110+
<entry> float8 </entry>
111+
<entry> base 10 logarithm </entry>
112+
<entry> log(2.0) </entry>
113+
</row>
114+
<row>
115+
<entry> pow(float8,float8) </entry>
89116
<entry> float8 </entry>
90117
<entry> raise a number to the specified exponent </entry>
91-
<entry> dpow(2.0, 16.0) </entry>
118+
<entry> pow(2.0, 16.0) </entry>
119+
</row>
120+
<row>
121+
<entry> round(float8) </entry>
122+
<entry> float8 </entry>
123+
<entry> round to nearest integer </entry>
124+
<entry> round(42.4) </entry>
125+
</row>
126+
<row>
127+
<entry> trunc(float8) </entry>
128+
<entry> float8 </entry>
129+
<entry> truncate (towards zero) </entry>
130+
<entry> trunc(42.4) </entry>
92131
</row>
93132
<row>
94133
<entry> float(int) </entry>
@@ -112,6 +151,11 @@
112151
</tgroup>
113152
</table>
114153
</para>
154+
155+
<para>
156+
Most of the functions listed for FLOAT8 are also available for
157+
type NUMERIC.
158+
</para>
115159
</sect1>
116160

117161
<sect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp