@@ -2075,16 +2075,18 @@ memcpy(destination->data, buffer, 40);
2075
2075
</para>
2076
2076
2077
2077
<para>
2078
- <xref linkend="xfunc-c-type-table"/>specifies which Ctype
2079
- corresponds towhich SQL type when writing a C-language function
2080
- that uses a built-in type of <productname>PostgreSQL</productname>.
2078
+ <xref linkend="xfunc-c-type-table"/>shows the Ctypes
2079
+ corresponding tomany of the built-in SQL data types
2080
+ of <productname>PostgreSQL</productname>.
2081
2081
The <quote>Defined In</quote> column gives the header file that
2082
2082
needs to be included to get the type definition. (The actual
2083
2083
definition might be in a different file that is included by the
2084
2084
listed file. It is recommended that users stick to the defined
2085
2085
interface.) Note that you should always include
2086
- <filename>postgres.h</filename> first in any source file, because
2087
- it declares a number of things that you will need anyway.
2086
+ <filename>postgres.h</filename> first in any source file of server
2087
+ code, because it declares a number of things that you will need
2088
+ anyway, and because including other headers first can cause
2089
+ portability issues.
2088
2090
</para>
2089
2091
2090
2092
<table tocentry="1" id="xfunc-c-type-table">
@@ -2109,11 +2111,6 @@ memcpy(destination->data, buffer, 40);
2109
2111
<entry><type>AbsoluteTime</type></entry>
2110
2112
<entry><filename>utils/nabstime.h</filename></entry>
2111
2113
</row>
2112
- <row>
2113
- <entry><type>bigint</type> (<type>int8</type>)</entry>
2114
- <entry><type>int64</type></entry>
2115
- <entry><filename>postgres.h</filename></entry>
2116
- </row>
2117
2114
<row>
2118
2115
<entry><type>boolean</type></entry>
2119
2116
<entry><type>bool</type></entry>
@@ -2150,28 +2147,28 @@ memcpy(destination->data, buffer, 40);
2150
2147
<entry><filename>utils/date.h</filename></entry>
2151
2148
</row>
2152
2149
<row>
2153
- <entry><type>smallint </type> (<type>int2 </type>)</entry>
2154
- <entry><type>int16 </type></entry>
2155
- <entry><filename>postgres.h</filename></entry>
2150
+ <entry><type>float4 </type> (<type>real </type>)</entry>
2151
+ <entry><type>float4 </type></entry>
2152
+ <entry><filename>postgres.h</filename></entry>
2156
2153
</row>
2157
2154
<row>
2158
- <entry><type>int2vector </type></entry>
2159
- <entry><type>int2vector* </type></entry>
2155
+ <entry><type>float8 </type> (<type>double precision</type>) </entry>
2156
+ <entry><type>float8 </type></entry>
2160
2157
<entry><filename>postgres.h</filename></entry>
2161
2158
</row>
2162
2159
<row>
2163
- <entry><type>integer </type> (<type>int4 </type>)</entry>
2164
- <entry><type>int32 </type></entry>
2160
+ <entry><type>int2 </type> (<type>smallint </type>)</entry>
2161
+ <entry><type>int16 </type></entry>
2165
2162
<entry><filename>postgres.h</filename></entry>
2166
2163
</row>
2167
2164
<row>
2168
- <entry><type>real </type> (<type>float4 </type>)</entry>
2169
- <entry><type>float4* </type></entry>
2170
- <entry><filename>postgres.h</filename></entry>
2165
+ <entry><type>int4 </type> (<type>integer </type>)</entry>
2166
+ <entry><type>int32 </type></entry>
2167
+ <entry><filename>postgres.h</filename></entry>
2171
2168
</row>
2172
2169
<row>
2173
- <entry><type>double precision </type> (<type>float8 </type>)</entry>
2174
- <entry><type>float8* </type></entry>
2170
+ <entry><type>int8 </type> (<type>bigint </type>)</entry>
2171
+ <entry><type>int64 </type></entry>
2175
2172
<entry><filename>postgres.h</filename></entry>
2176
2173
</row>
2177
2174
<row>
@@ -2189,6 +2186,11 @@ memcpy(destination->data, buffer, 40);
2189
2186
<entry><type>Name</type></entry>
2190
2187
<entry><filename>postgres.h</filename></entry>
2191
2188
</row>
2189
+ <row>
2190
+ <entry><type>numeric</type></entry>
2191
+ <entry><type>Numeric</type></entry>
2192
+ <entry><filename>utils/numeric.h</filename></entry>
2193
+ </row>
2192
2194
<row>
2193
2195
<entry><type>oid</type></entry>
2194
2196
<entry><type>Oid</type></entry>
@@ -2211,7 +2213,7 @@ memcpy(destination->data, buffer, 40);
2211
2213
</row>
2212
2214
<row>
2213
2215
<entry><type>regproc</type></entry>
2214
- <entry><type>regproc </type></entry>
2216
+ <entry><type>RegProcedure </type></entry>
2215
2217
<entry><filename>postgres.h</filename></entry>
2216
2218
</row>
2217
2219
<row>
@@ -2244,6 +2246,11 @@ memcpy(destination->data, buffer, 40);
2244
2246
<entry><type>Timestamp</type></entry>
2245
2247
<entry><filename>datatype/timestamp.h</filename></entry>
2246
2248
</row>
2249
+ <row>
2250
+ <entry><type>timestamp with time zone</type></entry>
2251
+ <entry><type>TimestampTz</type></entry>
2252
+ <entry><filename>datatype/timestamp.h</filename></entry>
2253
+ </row>
2247
2254
<row>
2248
2255
<entry><type>tinterval</type></entry>
2249
2256
<entry><type>TimeInterval</type></entry>