PostgreSQL �ο�¿���η����Ф��뻻�ѱ黻�Ҥ��Ѱդ���Ƥ��ޤ���
Table 4-2. ���ѱ黻��
̾�� | ���� | �� | ��� |
---|---|---|---|
+ | �� | 2 + 3 | 5 |
- | �� | 2 - 3 | -1 |
* | �� | 2 * 3 | 6 |
/ | �� (�����γ任�Ǥ�;����ڼΤ�) | 4 / 2 | 2 |
% | ��; (;��) | 5 % 4 | 1 |
^ | �Ѿ� | 2.0 ^ 3.0 | 8 |
|/ | ʿ���� | |/ 25.0 | 5 |
||/ | ���� | ||/ 27.0 | 3 |
! | ���� | 5 ! | 120 |
!! | ���� (���ֱ黻��) | !! 5 | 120 |
@ | ������ | @ -5.0 | 5 |
& | �Х��ʥ�� AND | 91 & 15 | 11 |
| | >�Х��ʥ�� OR | 32 | 3 | 35 |
# | >�Х��ʥ�� XOR | 17 # 5 | 20 |
~ | >�Х��ʥ�� NOT | ~1 | -2 |
<< | �Х��ʥ�κ����ե� | 1 << 4 | 16 |
>> | �Х��ʥ�α����ե� | 8 >> 2 | 2 |
"���"�黻�Ҥ�Ʊ�ͥӥå���ǡ����� BIT ����� BIT VARYING ���Ф��ƻ��ѤǤ��ޤ���
Table 4-3. �ӥå������黻��
�� | ��� |
---|---|
B'10001' & B'01101' | 00001 |
B'10001' | B'01101' | 11101 |
B'10001' # B'01101' | 11110 |
~ B'10001' | 01110 |
B'10001' << 3 | 01000 |
B'10001' >> 2 | 00100 |
Table 4-4. ���Ѵؿ�
�ؿ� | �֤��ͷ� | ���� | �� | ��� |
---|---|---|---|---|
abs(x) | (x ��Ʊ��) | ������ | abs(-17.4) | 17.4 |
cbrt(dp) | dp | ���� | cbrt(27.0) | 3 |
ceil(numeric) | numeric | ������꾮�����ʤ��Ǿ������� | ceil(-42.8) | -42 |
degrees(dp) | dp | �٤��б�����饸���� | degrees(0.5) | 28.6478897565412 |
exp(dp) | dp | �ؿ� | exp(1.0) | 2.71828182845905 |
floor(numeric) | numeric | ��������礭���ʤ���������� | floor(-42.8) | -43 |
ln(dp) | dp | �����п� | ln(2.0) | 0.693147180559945 |
log(dp) | dp | 10 ����Ȥ����п�(�����п�) | log(100.0) | 2 |
log(b numeric, x numeric) | numeric | ����Ф����п� b | log(2.0, 64.0) | 6.0000000000 |
mod(y, x) | (�����η���Ʊ��) | y/x �ξ�; | mod(9,4) | 1 |
pi() | dp | "��Ψ(��)" ��� | pi() | 3.14159265358979 |
pow(e dp, n dp) | dp | e �� | pow(9.0, 3.0) | 729 |
radians(dp) | dp | �饸������б������� | radians(45.0) | 0.785398163397448 |
random() | dp | 0.0 �� 1.0 ���� | random() | |
round(dp) | dp | �ͼθ��� | round(42.4) | 42 |
round(v numeric, s integer) | numeric | ���������� s �ǻͼθ��� | round(42.4382, 2) | 42.44 |
setseed(new-seed) | random() �ƽФ˰���³�������ɤ����� | setseed(0.54823) | ||
sign(numeric) | numeric | ��������� (-1, 0, +1) | sign(-8.4) | -1 |
sqrt(dp) | dp | ʿ���� | sqrt(2.0) | 1.4142135623731 |
trunc(dp) | dp | �ڼΤ� | trunc(42.8) | 42 |
trunc(numeric, s integer) | numeric | ���������� s ���ڼΤ� | trunc(42.4382, 2) | 42.43 |
���ɽ�� dp �� ������ ���̣���ޤ����ؿ� exp��ln�� log��pow�� round (���� 1 ��)��sqrt������� trunc (���� 1 ��)�� double precision �ǡ�����������Ȥ��� numeric ����Ѥ��뤳�Ȥ��Ǥ��ޤ������̤˻��ꤵ��ʤ��¤� numeric �ǡ��������֤��ؿ��� numeric �ǡ��������Ϥΰ�������ޤ��������δؿ���¿���ϥۥ��ȥ����ƥ�� C �饤�֥��ξ��ؤ˼�������ޤ���������ξ��˱��������Τ��ȿ���Ϥ������äƥۥ��ȥ����ƥ�˰�¸�����Ѳ����ޤ���
Table 4-5. ���Ѵؿ�
�ؿ� | ���� |
---|---|
acos(x) | ��;���ؿ� (arc cosine) |
asin(x) | �������ؿ� (arc sine) |
atan(x) | �����ܴؿ� (arc tangent) |
atan2(x, y) | y/x �ε����ܴؿ� (arc tangent) |
cos(x) | ;���ؿ� (cosine) |
cot(x) | ;�ܴؿ� (cotangent) |
sin(x) | �����ؿ� (sine) |
tan(x) | ���ܴؿ� (tangent) |
���٤Ƥλ��Ѵؿ��ˤ�double precision (������) �ǡ������ΰ������֤��ͤ�����ޤ���