Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b77572

Browse files
committed
Add mention of bytea data type and escaping rules.
1 parentb553cba commit9b77572

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
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 $
33
-->
44

55
<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
8383
<entry>rectangular box in 2D plane</entry>
8484
</row>
8585

86+
<row>
87+
<entry><type>bytea</type></entry>
88+
<entry></entry>
89+
<entry>binary data</entry>
90+
</row>
91+
8692
<row>
8793
<entry><type>character(<replaceable>n</replaceable>)</type></entry>
8894
<entry><type>char(<replaceable>n</replaceable>)</type></entry>
@@ -782,7 +788,11 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
782788
<entry>text</entry>
783789
<entry>Variable unlimited length</entry>
784790
</row>
785-
</tbody>
791+
<row>
792+
<entry>bytea</entry>
793+
<entry>binary data</entry>
794+
</row>
795+
</tbody>
786796
</tgroup>
787797
</table>
788798

@@ -829,6 +839,19 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
829839
standard, many other RDBMS packages have it as well.
830840
</para>
831841

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+
832855
<para>
833856
The storage requirement for data of these types is 4 bytes plus
834857
the actual string, and in case of <type>character</type> plus the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp