3 #define POSTGRES_ECPG_INTERNAL
4 #include "postgres_fe.h"
10 #include "sql3types.h"
14 * This function is used to generate the correct type names.
17 ecpg_type_name(enum ECPGttype typ
)
23 case ECPGt_unsigned_char
:
24 return "unsigned char";
27 case ECPGt_unsigned_short
:
28 return "unsigned short";
31 case ECPGt_unsigned_int
:
32 return "unsigned int";
35 case ECPGt_unsigned_long
:
36 return "unsigned long";
39 case ECPGt_unsigned_long_long
:
40 return "unsigned long long";
49 case ECPGt_char_variable
:
70 ecpg_dynamic_type(Oid type
)
75 return SQL3_BOOLEAN
; /* bool */
77 return SQL3_SMALLINT
; /* int2 */
79 return SQL3_INTEGER
; /* int4 */
81 return SQL3_CHARACTER
; /* text */
83 return SQL3_REAL
; /* float4 */
85 return SQL3_DOUBLE_PRECISION
; /* float8 */
87 return SQL3_CHARACTER
; /* bpchar */
89 return SQL3_CHARACTER_VARYING
; /* varchar */
91 return SQL3_DATE_TIME_TIMESTAMP
; /* date */
93 return SQL3_DATE_TIME_TIMESTAMP
; /* time */
95 return SQL3_DATE_TIME_TIMESTAMP
; /* datetime */
97 return SQL3_NUMERIC
; /* numeric */