PostgreSQL 9.2.4ʸ�� | ||||
---|---|---|---|---|
前のページ | 上に戻る | 第 9章�ؿ��ȱ黻�� | 次のページ |
表9-33�ˡ�inet�������cidr���ǻ��Ѳ�ǽ�ʱ黻�Ҥ��ޤ����黻�� <<��<<=��>>�������>>=�ϥ��֥ͥåȤ˴ޤޤ�Ƥ��뤫�ɤ�����Ĵ�٤��ΤǤ����ͥåȥ������ʬ�Τߤ��θ�ʥͥåȥ�����ɥ쥹�Υۥ�����ʬ��̵��ˤ���2�ĤΥͥåȥ�����ɥ쥹�������������⤷���ϰ����Υͥåȥ����¾���Υ��֥ͥåȤˤʤäƤ��뤫�����ꤷ�ޤ���
表 9-33. cidr��inet�黻��
�黻�� | ���� | �� |
---|---|---|
< | ̤�� | inet '192.168.1.5' < inet '192.168.1.6' |
<= | ̤���⤷�����������ʰʲ��� | inet '192.168.1.5' <= inet '192.168.1.5' |
= | ������ | inet '192.168.1.5' = inet '192.168.1.5' |
>= | ����礭���⤷�����������ʰʾ�� | inet '192.168.1.5' >= inet '192.168.1.5' |
> | ����礭�� | inet '192.168.1.5' > inet '192.168.1.4' |
<> | �������ʤ� | inet '192.168.1.5' <> inet '192.168.1.4' |
<< | ����� | inet '192.168.1.5' << inet '192.168.1/24' |
<<= | ����뤫������ | inet '192.168.1/24' <<= inet '192.168.1/24' |
>> | ���� | inet '192.168.1/24' >> inet '192.168.1.5' |
>>= | ���뤫������ | inet '192.168.1/24' >>= inet '192.168.1/24' |
~ | �ӥå����� | ~ inet '192.168.1.6' |
& | �ӥå��� | inet '192.168.1.6' & inet '0.0.0.255' |
| | �ӥå��� | inet '192.168.1.6' | inet '0.0.0.255' |
+ | �û� | inet '192.168.1.6' + 25 |
- | ���� | inet '192.168.1.43' - 36 |
- | ���� | inet '192.168.1.43' - inet '192.168.1.19' |
表9-34�ˡ�inet�������cidr���ǻ��Ѳ�ǽ�ʴؿ����ޤ���
�ؿ�abbrev
��host()
�������text()
���ϼ�Ȥ��ơ����ؤ�����ɽ����������Ū�Τ�ΤǤ���
表 9-34. cidr�����inet���ؿ�
�ؿ� | ����� | ���� | �� | ��� |
---|---|---|---|---|
abbrev(inet)
| text | ɽ���ѥƥ����Ⱦ�ά�� | abbrev(inet '10.1.0.0/16') | 10.1.0.0/16 |
abbrev(cidr) | text | ɽ���ѥƥ����Ⱦ�ά�� | abbrev(cidr '10.1.0.0/16') | 10.1/16 |
broadcast(inet)
| inet | �ͥåȥ���֥����ɥ��㥹�ȥ��ɥ쥹 | broadcast('192.168.1.5/24') | 192.168.1.255/24 |
family(inet)
| int | ���ɥ쥹�ե��ߥ�μ��Ф���IPv4�Ǥ�4��IPv6�Ǥ�6�� | family('::1') | 6 |
host(inet)
| text | IP���ɥ쥹��ƥ����Ȥ���� | host('192.168.1.5/24') | 192.168.1.5 |
hostmask(inet)
| inet | �ͥåȥ���ѤΥۥ��ȥޥ����ι��� | hostmask('192.168.23.20/30') | 0.0.0.3 |
masklen(inet)
| int | �ͥåȥޥ���Ĺ����� | masklen('192.168.1.5/24') | 24 |
netmask(inet)
| inet | �ͥåȥ���ѥͥåȥޥ����ι��� | netmask('192.168.1.5/24') | 255.255.255.0 |
network(inet)
| cidr | �ͥåȥ�����ɥ쥹����ͥåȥ��������� | network('192.168.1.5/24') | 192.168.1.0/24 |
set_masklen(inet, int)
| inet | inet�ͤΥͥåȥޥ���Ĺ������ | set_masklen('192.168.1.5/24', 16) | 192.168.1.5/16 |
set_masklen(cidr, int) | cidr | cidr�ͤΥͥåȥޥ���Ĺ������ | set_masklen('192.168.1.0/24'::cidr, 16) | 192.168.0.0/16 |
text(inet)
| text | IP���ɥ쥹�ȥͥåȥޥ���Ĺ��ƥ����Ȥ���� | text(inet '192.168.1.5') | 192.168.1.5/32 |
cidr�ͤϤ��٤ơ�����Ū�ޤ�������Ū��inet���˥��㥹�Ȳ�ǽ�Ǥ��� �������äơ���Ǽ�����inet���Ф�������Ԥ��ؿ���cidr�ͤǤ�ư��ޤ�����inet��cidr���̡��˴ؿ���¸�ߤ��ޤ���������ϡ�����2�Ĥ�ư��˰㤤�����뤿��Ǥ����ˤޤ���inet�ͤ���cidr�ؤΥ��㥹�Ȥ������ޤ������줬�Ԥ���ȡ��ͥåȥޥ����α�¦�ΥӥåȤϡ�cidr�Ȥ���ͭ�����ͤȤ��뤿���0�Ȥʤ�ޤ�������ˡ��̾�Υ��㥹�ȹ�ʸ���㤨�С�inet(expression)��colname::cidr����Ѥ��ơ��ƥ������ͤ�inet��cidr�˥��㥹�Ȥ��뤳�Ȥ�Ǥ��ޤ���
表9-35�ˡ�macaddr���ǻ��Ѳ�ǽ�ʴؿ����ޤ����ؿ�trunc(macaddr)
�Ͻ�����3�Х��Ȥ����������ꤵ�줿MAC���ɥ쥹���֤��ޤ�������ϡ��Ĥä���Ƭ������¤�Ԥ��б������뤳�Ȥ˻Ȥ��ޤ���
表 9-35. macaddr���ؿ�
�ؿ� | ����� | ���� | �� | ��� |
---|---|---|---|---|
trunc(macaddr)
| macaddr | �����Σ��Х��Ȥ������� | trunc(macaddr '12:34:56:78:90:ab') | 12:34:56:00:00:00 |
macaddr���ϡ�>��<=���Ρ˼����Խ�����¤٤�ɸ��ط��黻�Ҥ�NOT��AND��OR�Υӥåȱ黻��(~��&��|)�⥵�ݡ��Ȥ��Ƥ��ޤ���