@@ -2104,16 +2104,18 @@ memcpy(destination->data, buffer, 40);
2104
2104
</para>
2105
2105
2106
2106
<para>
2107
- <xref linkend="xfunc-c-type-table"/>specifies which Ctype
2108
- corresponds towhich SQL type when writing a C-language function
2109
- that uses a built-in type of <productname>PostgreSQL</productname>.
2107
+ <xref linkend="xfunc-c-type-table"/>shows the Ctypes
2108
+ corresponding tomany of the built-in SQL data types
2109
+ of <productname>PostgreSQL</productname>.
2110
2110
The <quote>Defined In</quote> column gives the header file that
2111
2111
needs to be included to get the type definition. (The actual
2112
2112
definition might be in a different file that is included by the
2113
2113
listed file. It is recommended that users stick to the defined
2114
2114
interface.) Note that you should always include
2115
- <filename>postgres.h</filename> first in any source file, because
2116
- it declares a number of things that you will need anyway.
2115
+ <filename>postgres.h</filename> first in any source file of server
2116
+ code, because it declares a number of things that you will need
2117
+ anyway, and because including other headers first can cause
2118
+ portability issues.
2117
2119
</para>
2118
2120
2119
2121
<table tocentry="1" id="xfunc-c-type-table">
@@ -2172,28 +2174,28 @@ memcpy(destination->data, buffer, 40);
2172
2174
<entry><filename>utils/date.h</filename></entry>
2173
2175
</row>
2174
2176
<row>
2175
- <entry><type>smallint </type> (<type>int2 </type>)</entry>
2176
- <entry><type>int16 </type></entry>
2177
- <entry><filename>postgres.h</filename></entry>
2177
+ <entry><type>float4 </type> (<type>real </type>)</entry>
2178
+ <entry><type>float4 </type></entry>
2179
+ <entry><filename>postgres.h</filename></entry>
2178
2180
</row>
2179
2181
<row>
2180
- <entry><type>int2vector </type></entry>
2181
- <entry><type>int2vector* </type></entry>
2182
+ <entry><type>float8 </type> (<type>double precision</type>) </entry>
2183
+ <entry><type>float8 </type></entry>
2182
2184
<entry><filename>postgres.h</filename></entry>
2183
2185
</row>
2184
2186
<row>
2185
- <entry><type>integer </type> (<type>int4 </type>)</entry>
2186
- <entry><type>int32 </type></entry>
2187
+ <entry><type>int2 </type> (<type>smallint </type>)</entry>
2188
+ <entry><type>int16 </type></entry>
2187
2189
<entry><filename>postgres.h</filename></entry>
2188
2190
</row>
2189
2191
<row>
2190
- <entry><type>real </type> (<type>float4 </type>)</entry>
2191
- <entry><type>float4* </type></entry>
2192
- <entry><filename>postgres.h</filename></entry>
2192
+ <entry><type>int4 </type> (<type>integer </type>)</entry>
2193
+ <entry><type>int32 </type></entry>
2194
+ <entry><filename>postgres.h</filename></entry>
2193
2195
</row>
2194
2196
<row>
2195
- <entry><type>double precision </type> (<type>float8 </type>)</entry>
2196
- <entry><type>float8* </type></entry>
2197
+ <entry><type>int8 </type> (<type>bigint </type>)</entry>
2198
+ <entry><type>int64 </type></entry>
2197
2199
<entry><filename>postgres.h</filename></entry>
2198
2200
</row>
2199
2201
<row>
@@ -2211,6 +2213,11 @@ memcpy(destination->data, buffer, 40);
2211
2213
<entry><type>Name</type></entry>
2212
2214
<entry><filename>postgres.h</filename></entry>
2213
2215
</row>
2216
+ <row>
2217
+ <entry><type>numeric</type></entry>
2218
+ <entry><type>Numeric</type></entry>
2219
+ <entry><filename>utils/numeric.h</filename></entry>
2220
+ </row>
2214
2221
<row>
2215
2222
<entry><type>oid</type></entry>
2216
2223
<entry><type>Oid</type></entry>
@@ -2233,7 +2240,7 @@ memcpy(destination->data, buffer, 40);
2233
2240
</row>
2234
2241
<row>
2235
2242
<entry><type>regproc</type></entry>
2236
- <entry><type>regproc </type></entry>
2243
+ <entry><type>RegProcedure </type></entry>
2237
2244
<entry><filename>postgres.h</filename></entry>
2238
2245
</row>
2239
2246
<row>
@@ -2261,6 +2268,11 @@ memcpy(destination->data, buffer, 40);
2261
2268
<entry><type>Timestamp</type></entry>
2262
2269
<entry><filename>datatype/timestamp.h</filename></entry>
2263
2270
</row>
2271
+ <row>
2272
+ <entry><type>timestamp with time zone</type></entry>
2273
+ <entry><type>TimestampTz</type></entry>
2274
+ <entry><filename>datatype/timestamp.h</filename></entry>
2275
+ </row>
2264
2276
<row>
2265
2277
<entry><type>varchar</type></entry>
2266
2278
<entry><type>VarChar*</type></entry>