- specifies which C type
- corresponds to which SQL type when writing a C-language function
-
that uses a built-in type of
PostgreSQL.
+ shows the C types
+ corresponding to many of the built-in SQL data types
The Defined In
column gives the header file that
needs to be included to get the type definition. (The actual
definition might be in a different file that is included by the
listed file. It is recommended that users stick to the defined
interface.) Note that you should always include
- postgres.h first in any source file, because
- it declares a number of things that you will need anyway.
+ postgres.h first in any source file of server
+ code, because it declares a number of things that you will need
+ anyway, and because including other headers first can cause
+ portability issues.
utils/date.h
|
- smallint (int2)
- int16
- postgres.h
+ float4 (real)
+ float4
+ postgres.h
|
- int2vector
- int2vector*
+ float8 (double precision)
+ float8
postgres.h
|
- integer (int4)
- int32
+ int2 (smallint)
+ int16
postgres.h
|
- real (float4)
- float4*
- postgres.h
+ int4 (integer)
+ int32
+ postgres.h
|
- double precision (float8)
- float8*
+ int8 (bigint)
+ int64
postgres.h
|
Name
postgres.h
+ |
+ numeric
+ Numeric
+ utils/numeric.h
+
|
oid
Oid
|
regproc
- regproc
+ RegProcedure
postgres.h
|
Timestamp
datatype/timestamp.h
+ |
+ timestamp with time zone
+ TimestampTz
+ datatype/timestamp.h
+
|
varchar
VarChar*