|
1 | 1 | <!--
|
2 |
| -$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.60 2001/08/31 01:55:25 ishii Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.61 2001/09/04 03:17:54 momjian Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <chapter id="datatype">
|
@@ -83,6 +83,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.60 2001/08/31 01:55:25 is
|
83 | 83 | <entry>rectangular box in 2D plane</entry>
|
84 | 84 | </row>
|
85 | 85 |
|
| 86 | + <row> |
| 87 | + <entry><type>bytea</type></entry> |
| 88 | + <entry></entry> |
| 89 | + <entry>binary data</entry> |
| 90 | + </row> |
| 91 | + |
86 | 92 | <row>
|
87 | 93 | <entry><type>character(<replaceable>n</replaceable>)</type></entry>
|
88 | 94 | <entry><type>char(<replaceable>n</replaceable>)</type></entry>
|
@@ -782,7 +788,11 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
782 | 788 | <entry>text</entry>
|
783 | 789 | <entry>Variable unlimited length</entry>
|
784 | 790 | </row>
|
785 |
| - </tbody> |
| 791 | + <row> |
| 792 | + <entry>bytea</entry> |
| 793 | + <entry>binary data</entry> |
| 794 | + </row> |
| 795 | + </tbody> |
786 | 796 | </tgroup>
|
787 | 797 | </table>
|
788 | 798 |
|
@@ -829,6 +839,19 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
829 | 839 | standard, many other RDBMS packages have it as well.
|
830 | 840 | </para>
|
831 | 841 |
|
| 842 | + <para> |
| 843 | + The <type>bytea</type> data type allows storage of binary data, |
| 844 | + specifically allowing storage of NULLs which are entered as |
| 845 | + <literal>'\\000'</>. The first backslash is interpreted by the |
| 846 | + single quotes, and the second is recognized by <type>bytea</> and |
| 847 | + preceeds a three digit octal value. For a similar reason, a |
| 848 | + backslash must be entered into a field as <literal>'\\\\'</> or |
| 849 | + <literal>'\\134'</>. You may also have to escape line feeds and |
| 850 | + carriage return if your interface automatically translates these. It |
| 851 | + can store values of any length. <type>Bytea</> is a non-standard |
| 852 | + data type. |
| 853 | + </para> |
| 854 | + |
832 | 855 | <para>
|
833 | 856 | The storage requirement for data of these types is 4 bytes plus
|
834 | 857 | the actual string, and in case of <type>character</type> plus the
|
|
0 commit comments