Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > by-pkgid > db7d48fed1469a51f3fb965d5b5b2ac1 > files > 337

postgresql-docs-7.4.1-2.5.100mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Message Data Types</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 7.4.1 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="Frontend/Backend Protocol"
HREF="protocol.html"><LINK
REL="PREVIOUS"
TITLE="Message Flow"
HREF="protocol-flow.html"><LINK
REL="NEXT"
TITLE="Message Formats"
HREF="protocol-message-formats.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
NAME="creation"
CONTENT="2003-12-22T03:48:47"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
>PostgreSQL 7.4.1 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="protocol-flow.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="protocol.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 44. Frontend/Backend Protocol</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="protocol.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="protocol-message-formats.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="PROTOCOL-MESSAGE-TYPES"
>44.3. Message Data Types</A
></H1
><P
>This section describes the base data types used in messages.

<P
></P
></P><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Int<VAR
CLASS="REPLACEABLE"
>n</VAR
>(<VAR
CLASS="REPLACEABLE"
>i</VAR
>)</DT
><DD
><P
>                An <VAR
CLASS="REPLACEABLE"
>n</VAR
>-bit integer in network byte
		order (most significant byte first).
                If <VAR
CLASS="REPLACEABLE"
>i</VAR
> is specified it
                is the exact value that will appear, otherwise the value
		is variable.  Eg. Int16, Int32(42).</P
></DD
><DT
>Int<VAR
CLASS="REPLACEABLE"
>n</VAR
>[<VAR
CLASS="REPLACEABLE"
>k</VAR
>]</DT
><DD
><P
>		An array of <VAR
CLASS="REPLACEABLE"
>k</VAR
>
                <VAR
CLASS="REPLACEABLE"
>n</VAR
>-bit integers, each in network
		byte order.  The array length <VAR
CLASS="REPLACEABLE"
>k</VAR
>
		is always determined by an earlier field in the message.
		Eg. Int16[M].</P
></DD
><DT
>String(<VAR
CLASS="REPLACEABLE"
>s</VAR
>)</DT
><DD
><P
>                A null-terminated string (C-style string).  There is no
		specific length limitation on strings.
                If <VAR
CLASS="REPLACEABLE"
>s</VAR
> is specified it is the exact
		value that will appear, otherwise the value is variable.
                Eg. String, String("user").</P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>There is no predefined limit</I
></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
></BLOCKQUOTE
></DIV
></DD
><DT
>Byte<VAR
CLASS="REPLACEABLE"
>n</VAR
>(<VAR
CLASS="REPLACEABLE"
>c</VAR
>)</DT
><DD
><P
>                Exactly <VAR
CLASS="REPLACEABLE"
>n</VAR
> bytes.  If the field
		width <VAR
CLASS="REPLACEABLE"
>n</VAR
> is not a constant, it is
		always determinable from an earlier field in the message.
                If <VAR
CLASS="REPLACEABLE"
>c</VAR
> is specified it is the exact
                value.  Eg. Byte2, Byte1('\n').</P
></DD
></DL
></DIV
><P></P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="protocol-flow.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="protocol-message-formats.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Message Flow</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="protocol.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Message Formats</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>