mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Refactor format_type APIs to be more modular
Introduce a new format_type_extended, with a flags bitmask argument that can modify the default behavior. A few compatibility and readability wrappers remain: format_type_be format_type_be_qualified format_type_with_typemod while format_type_with_typemod_qualified, which had a single caller, is removed. Author: Michael Paquier, some revisions by me Discussion: 20180213035107.GA2915@paquier.xyz
This commit is contained in:
@@ -112,10 +112,17 @@ extern void clean_ipv6_addr(int addr_family, char *addr);
|
||||
extern Datum numeric_float8_no_overflow(PG_FUNCTION_ARGS);
|
||||
|
||||
/* format_type.c */
|
||||
|
||||
/* Control flags for format_type_extended */
|
||||
#define FORMAT_TYPE_TYPEMOD_GIVEN 0x01 /* typemod defined by caller */
|
||||
#define FORMAT_TYPE_ALLOW_INVALID 0x02 /* allow invalid types */
|
||||
#define FORMAT_TYPE_FORCE_QUALIFY 0x04 /* force qualification of type */
|
||||
extern char *format_type_extended(Oid type_oid, int32 typemod, bits16 flags);
|
||||
|
||||
extern char *format_type_be(Oid type_oid);
|
||||
extern char *format_type_be_qualified(Oid type_oid);
|
||||
extern char *format_type_with_typemod(Oid type_oid, int32 typemod);
|
||||
extern char *format_type_with_typemod_qualified(Oid type_oid, int32 typemod);
|
||||
|
||||
extern int32 type_maximum_size(Oid type_oid, int32 typemod);
|
||||
|
||||
/* quote.c */
|
||||
|
||||
Reference in New Issue
Block a user