¾�ΥС�������ʸ�� �� 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9.6 | 9.5 | 9.4 | 9.3 | 9.2 | 9.1 | 9.0 | 8.4 | 8.3 | 8.2 | 8.1 | 8.0 | 7.4 | 7.3 | 7.2

9.5. �Х��ʥ���ؿ��ȱ黻��

����Ǥ�bytea�����ͤ�Ĵ�٤������뤿��δؿ��ȱ黻�ҤˤĤ����������ޤ���

SQL�Ǥϡ������ζ��ڤ�˥���ޤǤϤʤ�����Υ�����ɤ�Ȥ��ü�ʹ�ʸ��ʸ����ؿ��򡢤����Ĥ�������Ƥ��ޤ��� �ܺ٤�ɽ9-9�򻲾Ȥ��Ƥ��������� �����ؿ����̾�δؿ��ƤӽФ���ʸ����Ѥ��Ƽ�������Ƥ��ޤ��� (ɽ9-10�򻲾Ȥ��Ƥ���������)

ɽ 9-9. SQL�Х��ʥ���ؿ��ȱ黻��

�ؿ��֤��ͷ����������
string || string bytea ʸ������ '\\\\Post'::bytea || '\\047gres\\000'::bytea\\Post'gres\000
octet_length(string)integer�Х��ʥ���ΥХ��ȿ�octet_length( 'jo\\000se'::bytea)5
position(substring in string)integer���ꤵ�줿��ʬʸ����ξ��position('\\000om'::bytea in 'Th\\000omas'::bytea)3
substring(string [from integer] [for integer])bytea ��ʬʸ����μ��Ф� substring('Th\\000omas'::bytea from 2 for 3)h\000o
trim([both] bytes from string) byteabytes�ǻ��ꤵ���Х��ȤΤߤ�ޤ�Ǥ�Ĺ��ʸ�����string����Ƭ���������������ޤ��� trim('\\000'::bytea from '\\000Tom\\000'::bytea)Tom
get_byte(string, offset)integer ʸ���󤫤�1�Х��Ȥ���Ф��� get_byte('Th\\000omas'::bytea, 4)109
set_byte(string, offset, newvalue)bytea ʸ�������1�Х��Ȥ����ꤹ�롣 set_byte('Th\\000omas'::bytea, 4, 64)Th\000o@as
get_bit(string, offset)integer ʸ���󤫤�1�ӥåȤ���Ф��� get_bit('Th\\000omas'::bytea, 45)1
set_bit(string, offset, newvalue)bytea ʸ�������1�ӥåȤ����ꤹ�롣 set_bit('Th\\000omas'::bytea, 45, 0)Th\000omAs

���Τۤ���ɽ9-10����󤹤�Х��ʥ������ؿ����Ȥ��ޤ��� ���Τ����Ĥ��ϡ�ɽ9-9����������ɸ��SQL��ʸ����ؿ���������뤿�������Ū�˻��Ѥ���Ƥ��ޤ���

ɽ 9-10. ����¾�ΥХ��ʥ���ؿ�

�ؿ��֤��ͷ����������
btrim(string bytea bytes bytea)byteabytes�ǻ��ꤵ�줿�Х��ȤΤߤ�ͭ�����Ĺ��ʸ�����string����Ƭ���������������ޤ��� btrim('\\000trim\\000'::bytea, '\\000'::bytea)trim
length(string)integer �Х��ʥ����Ĺ�� length('jo\\000se'::bytea)5
decode(string text, type text) bytea������encode()����沽���줿string����Х��ʥ�������椷�ޤ��� �ѥ�᡼���η���encode()��Ʊ���Ǥ��� decode('123\\000456', 'escape')123\000456
encode(string bytea, type text) text�Х��ʥ����ASCII�Τߤ�ɽ������沽���ޤ��� ���ݡ��Ȥ���Ƥ��뷿�ϡ�base64��hex��escape�Ǥ��� encode('123\\000456'::bytea, 'escape')123\000456