summaryrefslogtreecommitdiff
path: root/doc/src/sgml/xfunc.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/xfunc.sgml')
-rw-r--r--doc/src/sgml/xfunc.sgml13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index e2b10703ee..7b2d2b0ad3 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -1739,6 +1739,13 @@ PG_MODULE_MAGIC;
/* 4-byte integer, passed by value */
typedef int int4;
</programlisting>
+
+ (The actual PostgreSQL C code calls this type <type>int32</type>, because
+ it is a convention in C that <type>int<replaceable>XX</replaceable></type>
+ means <replaceable>XX</replaceable> <emphasis>bits</emphasis>. Note
+ therefore also that the C type <type>int8</type> is 1 byte in size. The
+ SQL type <type>int8</type> is called <type>int64</type> in C. See also
+ <xref linkend="xfunc-c-type-table">.)
</para>
<para>
@@ -1801,7 +1808,7 @@ typedef struct
<programlisting>
typedef struct {
- int4 length;
+ int32 length;
char data[1];
} text;
</programlisting>
@@ -1913,7 +1920,7 @@ memcpy(destination->data, buffer, 40);
</row>
<row>
<entry><type>smallint</type> (<type>int2</type>)</entry>
- <entry><type>int2</type> or <type>int16</type></entry>
+ <entry><type>int16</type></entry>
<entry><filename>postgres.h</filename></entry>
</row>
<row>
@@ -1923,7 +1930,7 @@ memcpy(destination->data, buffer, 40);
</row>
<row>
<entry><type>integer</type> (<type>int4</type>)</entry>
- <entry><type>int4</type> or <type>int32</type></entry>
+ <entry><type>int32</type></entry>
<entry><filename>postgres.h</filename></entry>
</row>
<row>