Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 9b6cc37ce608401d44f6535a0c7cb777 > files > 633

postgresql11-docs-11.5-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>53.6. Message Data Types</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="protocol-logical-replication.html" title="53.5. Logical Streaming Replication Protocol" /><link rel="next" href="protocol-message-formats.html" title="53.7. Message Formats" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">53.6. Message Data Types</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="protocol-logical-replication.html" title="53.5. Logical Streaming Replication Protocol">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="protocol.html" title="Chapter 53. Frontend/Backend Protocol">Up</a></td><th width="60%" align="center">Chapter 53. Frontend/Backend Protocol</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 11.5 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="protocol-message-formats.html" title="53.7. Message Formats">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="PROTOCOL-MESSAGE-TYPES"><div class="titlepage"><div><div><h2 class="title" style="clear: both">53.6. Message Data Types</h2></div></div></div><p>
This section describes the base data types used in messages.

</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
        Int<em class="replaceable"><code>n</code></em>(<em class="replaceable"><code>i</code></em>)
</span></dt><dd><p>
                An <em class="replaceable"><code>n</code></em>-bit integer in network byte
                order (most significant byte first).
                If <em class="replaceable"><code>i</code></em> is specified it
                is the exact value that will appear, otherwise the value
                is variable.  Eg. Int16, Int32(42).
</p></dd><dt><span class="term">
        Int<em class="replaceable"><code>n</code></em>[<em class="replaceable"><code>k</code></em>]
</span></dt><dd><p>
                An array of <em class="replaceable"><code>k</code></em>
                <em class="replaceable"><code>n</code></em>-bit integers, each in network
                byte order.  The array length <em class="replaceable"><code>k</code></em>
                is always determined by an earlier field in the message.
                Eg. Int16[M].
</p></dd><dt><span class="term">
        String(<em class="replaceable"><code>s</code></em>)
</span></dt><dd><p>
                A null-terminated string (C-style string).  There is no
                specific length limitation on strings.
                If <em class="replaceable"><code>s</code></em> is specified it is the exact
                value that will appear, otherwise the value is variable.
                Eg. String, String("user").
</p><div class="note"><h3 class="title">Note</h3><p>
<span class="emphasis"><em>There is no predefined limit</em></span> on the length of a string
that can be returned by the backend.  Good coding strategy for a frontend
is to use an expandable buffer so that anything that fits in memory can be
accepted.  If that's not feasible, read the full string and discard trailing
characters that don't fit into your fixed-size buffer.
</p></div></dd><dt><span class="term">
        Byte<em class="replaceable"><code>n</code></em>(<em class="replaceable"><code>c</code></em>)
</span></dt><dd><p>
                Exactly <em class="replaceable"><code>n</code></em> bytes.  If the field
                width <em class="replaceable"><code>n</code></em> is not a constant, it is
                always determinable from an earlier field in the message.
                If <em class="replaceable"><code>c</code></em> is specified it is the exact
                value.  Eg. Byte2, Byte1('\n').
</p></dd></dl></div><p>
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="protocol-logical-replication.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="protocol.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="protocol-message-formats.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">53.5. Logical Streaming Replication Protocol </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 53.7. Message Formats</td></tr></table></div></body></html>