|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.396 2007/09/18 17:41:16 adunstan Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.397 2007/09/19 03:13:57 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="functions">
|
4 | 4 | <title>Functions and Operators</title>
|
|
1129 | 1129 | there are some pre-defined conversion names. See <xref
|
1130 | 1130 | linkend="conversion-names"> for available conversion
|
1131 | 1131 | names. The <parameter>string</parameter> must be valid in the
|
1132 |
| - source encoding. |
| 1132 | + source encoding. |
1133 | 1133 | </entry>
|
1134 | 1134 | <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf8)</literal></entry>
|
1135 | 1135 | <entry><literal>'PostgreSQL'</literal> in UTF8 (Unicode, 8-bit) encoding</entry>
|
|
1327 | 1327 | <entry><literal><function>ascii</function>(<parameter>string</parameter>)</literal></entry>
|
1328 | 1328 | <entry><type>int</type></entry>
|
1329 | 1329 | <entry>
|
1330 |
| - <acronym>ASCII</acronym> code of the first character of the argument. |
1331 |
| - For <acronym>UTF8</acronym> returns the Unicode code point of the character. |
1332 |
| - For other multi-byte encodings. the argument must be a strictly |
1333 |
| - <acronym>ASCII</acronym> character. |
1334 |
| - </entry> |
| 1330 | + <acronym>ASCII</acronym> code of the first character of the |
| 1331 | + argument. For <acronym>UTF8</acronym> returns the Unicode code |
| 1332 | + point of the character. For other multi-byte encodings. the |
| 1333 | + argument must be a strictly <acronym>ASCII</acronym> character. |
| 1334 | + </entry> |
1335 | 1335 | <entry><literal>ascii('x')</literal></entry>
|
1336 | 1336 | <entry><literal>120</literal></entry>
|
1337 | 1337 | </row>
|
|
1353 | 1353 | <entry><literal><function>chr</function>(<type>int</type>)</literal></entry>
|
1354 | 1354 | <entry><type>text</type></entry>
|
1355 | 1355 | <entry>
|
1356 |
| - Character with the given code. For <acronym>UTF8</acronym> the argument is |
1357 |
| - treated as a Unicode code point. For other multi-byte encodings the argument |
1358 |
| - must designate a strictly <acronym>ASCII</acronym> character. |
1359 |
| - </entry> |
| 1356 | + Character with the given code. For <acronym>UTF8</acronym> the |
| 1357 | + argument is treated as a Unicode code point. For other multi-byte |
| 1358 | + encodings the argument must designate a strictly |
| 1359 | + <acronym>ASCII</acronym> character. |
| 1360 | + </entry> |
1360 | 1361 | <entry><literal>chr(65)</literal></entry>
|
1361 | 1362 | <entry><literal>A</literal></entry>
|
1362 | 1363 | </row>
|
|
1369 | 1370 | </entry>
|
1370 | 1371 | <entry><type>bytea</type></entry>
|
1371 | 1372 | <entry>
|
1372 |
| - Convert string to <parameter>dest_encoding</parameter>. |
1373 |
| - The original encoding is specified by |
1374 |
| - <parameter>src_encoding</parameter>. The <parameter>string</parameter> |
1375 |
| - must be valid in this encoding. |
| 1373 | + Convert string to <parameter>dest_encoding</parameter>. The |
| 1374 | + original encoding is specified by |
| 1375 | + <parameter>src_encoding</parameter>. The |
| 1376 | + <parameter>string</parameter> must be valid in this encoding. |
1376 | 1377 | </entry>
|
1377 | 1378 | <entry><literal>convert( 'text_in_utf8', 'UTF8', 'LATIN1')</literal></entry>
|
1378 | 1379 | <entry><literal>text_in_utf8</literal> represented in ISO 8859-1 encoding</entry>
|
|
1385 | 1386 | </entry>
|
1386 | 1387 | <entry><type>text</type></entry>
|
1387 | 1388 | <entry>
|
1388 |
| - Convert string to the database encoding. |
1389 |
| - The original encoding is specified by |
1390 |
| - <parameter>src_encoding</parameter>. The <parameter>string</parameter> |
1391 |
| - must be valid in this encoding. |
| 1389 | + Convert string to the database encoding. The original encoding |
| 1390 | + is specified by <parameter>src_encoding</parameter>. The |
| 1391 | + <parameter>string</parameter> must be valid in this encoding. |
1392 | 1392 | </entry>
|
1393 | 1393 | <entry><literal>convert_from( 'text_in_utf8', 'UTF8')</literal></entry>
|
1394 | 1394 | <entry><literal>text_in_utf8</literal> represented in the current database encoding</entry>
|
|
1464 | 1464 | <parameter>encoding</parameter> <type>name</type> )</literal></entry>
|
1465 | 1465 | <entry><type>int</type></entry>
|
1466 | 1466 | <entry>
|
1467 |
| - Number of characters in <parameter>string</parameter> in the |
1468 |
| - given <parameter>encoding</parameter>. The |
1469 |
| - <parameter>string</parameter> must be valid in this encoding. |
| 1467 | + Number of characters in <parameter>string</parameter> in the given |
| 1468 | + <parameter>encoding</parameter>. The <parameter>string</parameter> |
| 1469 | + must be valid in this encoding. |
1470 | 1470 | </entry>
|
1471 | 1471 | <entry><literal>length('jose', 'UTF8')</literal></entry>
|
1472 | 1472 | <entry><literal>4</literal></entry>
|
|
0 commit comments