Commit f21a563d authored by Peter Eisentraut's avatar Peter Eisentraut

Move some things from builtins.h to new header files

This avoids that builtins.h has to include additional header files.
parent c6a38979
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "bloom.h" #include "bloom.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "catalog/pg_collation.h" #include "catalog/pg_collation.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/formatting.h" #include "utils/formatting.h"
#include "utils/varlena.h"
#ifdef PG_MODULE_MAGIC #ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/varlena.h"
#include "dblink.h" #include "dblink.h"
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/varlena.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/varlena.h"
PG_FUNCTION_INFO_V1(bt_metap); PG_FUNCTION_INFO_V1(bt_metap);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/pg_lsn.h" #include "utils/pg_lsn.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/varlena.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/snapmgr.h" #include "utils/snapmgr.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/varlena.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/varlena.h"
/* /*
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "storage/lmgr.h" #include "storage/lmgr.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/varlena.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "commands/defrem.h" #include "commands/defrem.h"
#include "commands/extension.h" #include "commands/extension.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/varlena.h"
/* /*
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "tsearch/ts_utils.h" #include "tsearch/ts_utils.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/guc.h" #include "utils/guc.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "tsearch/ts_locale.h" #include "tsearch/ts_locale.h"
#include "tsearch/ts_public.h" #include "tsearch/ts_public.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/regproc.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/regproc.h"
/* /*
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/regproc.h"
/* /*
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "parser/parse_coerce.h" #include "parser/parse_coerce.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/fmgroids.h" #include "utils/fmgroids.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "catalog/pg_opfamily.h" #include "catalog/pg_opfamily.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/datum.h" #include "utils/datum.h"
#include "utils/pg_locale.h" #include "utils/pg_locale.h"
#include "utils/varlena.h"
/* /*
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "catalog/pg_opfamily.h" #include "catalog/pg_opfamily.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
/* /*
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
#include "utils/fmgroids.h" #include "utils/fmgroids.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/tqual.h" #include "utils/tqual.h"
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "utils/acl.h" #include "utils/acl.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/regproc.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/snapmgr.h" #include "utils/snapmgr.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/varlena.h"
/* Globally visible state variables */ /* Globally visible state variables */
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "utils/inval.h" #include "utils/inval.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/regproc.h"
#include "utils/snapmgr.h" #include "utils/snapmgr.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/tqual.h" #include "utils/tqual.h"
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/resowner.h" #include "utils/resowner.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
/* /*
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/varlena.h"
/* GUC variables */ /* GUC variables */
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/snapmgr.h" #include "utils/snapmgr.h"
#include "utils/timestamp.h" #include "utils/timestamp.h"
#include "utils/varlena.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
/* /*
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
#define MAX_FUZZY_DISTANCE 3 #define MAX_FUZZY_DISTANCE 3
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/ps_status.h" #include "utils/ps_status.h"
#include "utils/timeout.h" #include "utils/timeout.h"
#include "utils/varlena.h"
#ifdef EXEC_BACKEND #ifdef EXEC_BACKEND
#include "storage/spin.h" #include "storage/spin.h"
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "utils/inval.h" #include "utils/inval.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/pg_lsn.h" #include "utils/pg_lsn.h"
#include "utils/regproc.h"
#include "utils/resowner.h" #include "utils/resowner.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
#include "replication/origin.h" #include "replication/origin.h"
#include "replication/pgoutput.h" #include "replication/pgoutput.h"
#include "utils/builtins.h"
#include "utils/inval.h" #include "utils/inval.h"
#include "utils/int8.h" #include "utils/int8.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "tsearch/ts_locale.h" #include "tsearch/ts_locale.h"
#include "tsearch/ts_utils.h" #include "tsearch/ts_utils.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/regproc.h"
/* /*
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "tsearch/ts_cache.h" #include "tsearch/ts_cache.h"
#include "tsearch/ts_utils.h" #include "tsearch/ts_utils.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/varlena.h"
/******sql-level interface******/ /******sql-level interface******/
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
typedef struct typedef struct
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/jsonb.h" #include "utils/jsonb.h"
#include "utils/varlena.h"
typedef struct PathHashStack typedef struct PathHashStack
{ {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/jsonb.h" #include "utils/jsonb.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/varlena.h"
/* /*
* Maximum number of elements in an array (or key/value pairs in an object). * Maximum number of elements in an array (or key/value pairs in an object).
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "regex/regex.h" #include "regex/regex.h"
#include "utils/array.h" #include "utils/array.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/varlena.h"
#define PG_GETARG_TEXT_PP_IF_EXISTS(_n) \ #define PG_GETARG_TEXT_PP_IF_EXISTS(_n) \
(PG_NARGS() > (_n) ? PG_GETARG_TEXT_PP(_n) : NULL) (PG_NARGS() > (_n) ? PG_GETARG_TEXT_PP(_n) : NULL)
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/acl.h" #include "utils/acl.h"
#include "utils/regproc.h"
#include "utils/varlena.h"
static char *format_operator_internal(Oid operator_oid, bool force_qualify); static char *format_operator_internal(Oid operator_oid, bool force_qualify);
static char *format_procedure_internal(Oid procedure_oid, bool force_qualify); static char *format_procedure_internal(Oid procedure_oid, bool force_qualify);
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/typcache.h" #include "utils/typcache.h"
#include "utils/varlena.h"
#include "utils/xml.h" #include "utils/xml.h"
......
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
#include "utils/timestamp.h" #include "utils/timestamp.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/typcache.h" #include "utils/typcache.h"
#include "utils/varlena.h"
/* Hooks for plugins to get control when we ask for stats */ /* Hooks for plugins to get control when we ask for stats */
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/snapmgr.h" #include "utils/snapmgr.h"
#include "utils/tqual.h" #include "utils/tqual.h"
#include "utils/varlena.h"
#define DatumGetItemPointer(X) ((ItemPointer) DatumGetPointer(X)) #define DatumGetItemPointer(X) ((ItemPointer) DatumGetPointer(X))
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "tsearch/ts_utils.h" #include "tsearch/ts_utils.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/regproc.h"
#include "utils/rel.h" #include "utils/rel.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "utils/array.h" #include "utils/array.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/varlena.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/pg_locale.h" #include "utils/pg_locale.h"
#include "utils/sortsupport.h" #include "utils/sortsupport.h"
#include "utils/varlena.h"
/* GUC variable */ /* GUC variable */
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "utils/inval.h" #include "utils/inval.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/regproc.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/tqual.h" #include "utils/tqual.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/regproc.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/typcache.h" #include "utils/typcache.h"
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "utils/guc.h" #include "utils/guc.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
#define DIRECTORY_LOCK_FILE "postmaster.pid" #define DIRECTORY_LOCK_FILE "postmaster.pid"
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
#include "utils/rls.h" #include "utils/rls.h"
#include "utils/snapmgr.h" #include "utils/snapmgr.h"
#include "utils/tzparser.h" #include "utils/tzparser.h"
#include "utils/varlena.h"
#include "utils/xml.h" #include "utils/xml.h"
#ifndef PG_KRB_SRVTAB #ifndef PG_KRB_SRVTAB
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/rls.h" #include "utils/rls.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
/* /*
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
#include "fmgr.h" #include "fmgr.h"
#include "nodes/nodes.h" #include "nodes/nodes.h"
#include "nodes/pg_list.h"
#include "utils/fmgrprotos.h" #include "utils/fmgrprotos.h"
#include "utils/sortsupport.h"
/* bool.c */ /* bool.c */
...@@ -74,17 +72,6 @@ extern Oid oidparse(Node *node); ...@@ -74,17 +72,6 @@ extern Oid oidparse(Node *node);
extern char *regexp_fixed_prefix(text *text_re, bool case_insensitive, extern char *regexp_fixed_prefix(text *text_re, bool case_insensitive,
Oid collation, bool *exact); Oid collation, bool *exact);
/* regproc.c */
extern List *stringToQualifiedNameList(const char *string);
extern char *format_procedure(Oid procedure_oid);
extern char *format_procedure_qualified(Oid procedure_oid);
extern void format_procedure_parts(Oid operator_oid, List **objnames,
List **objargs);
extern char *format_operator(Oid operator_oid);
extern char *format_operator_qualified(Oid operator_oid);
extern void format_operator_parts(Oid operator_oid, List **objnames,
List **objargs);
/* ruleutils.c */ /* ruleutils.c */
extern bool quote_all_identifiers; extern bool quote_all_identifiers;
extern const char *quote_identifier(const char *ident); extern const char *quote_identifier(const char *ident);
...@@ -94,7 +81,7 @@ extern char *quote_qualified_identifier(const char *qualifier, ...@@ -94,7 +81,7 @@ extern char *quote_qualified_identifier(const char *qualifier,
/* varchar.c */ /* varchar.c */
extern int bpchartruelen(char *s, int len); extern int bpchartruelen(char *s, int len);
/* varlena.c */ /* popular functions from varlena.c */
extern text *cstring_to_text(const char *s); extern text *cstring_to_text(const char *s);
extern text *cstring_to_text_with_len(const char *s, int len); extern text *cstring_to_text_with_len(const char *s, int len);
extern char *text_to_cstring(const text *t); extern char *text_to_cstring(const text *t);
...@@ -103,24 +90,6 @@ extern void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len); ...@@ -103,24 +90,6 @@ extern void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len);
#define CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s)) #define CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s))
#define TextDatumGetCString(d) text_to_cstring((text *) DatumGetPointer(d)) #define TextDatumGetCString(d) text_to_cstring((text *) DatumGetPointer(d))
extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid);
extern void varstr_sortsupport(SortSupport ssup, Oid collid, bool bpchar);
extern int varstr_levenshtein(const char *source, int slen,
const char *target, int tlen,
int ins_c, int del_c, int sub_c,
bool trusted);
extern int varstr_levenshtein_less_equal(const char *source, int slen,
const char *target, int tlen,
int ins_c, int del_c, int sub_c,
int max_d, bool trusted);
extern List *textToQualifiedNameList(text *textval);
extern bool SplitIdentifierString(char *rawstring, char separator,
List **namelist);
extern bool SplitDirectoriesString(char *rawstring, char separator,
List **namelist);
extern text *replace_text_regexp(text *src_text, void *regexp,
text *replace_text, bool glob);
/* xid.c */ /* xid.c */
extern int xidComparator(const void *arg1, const void *arg2); extern int xidComparator(const void *arg1, const void *arg2);
......
/*-------------------------------------------------------------------------
*
* regproc.h
* Functions for the built-in types regproc, regclass, regtype, etc.
*
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/utils/regproc.h
*
*-------------------------------------------------------------------------
*/
#ifndef REGPROC_H
#define REGPROC_H
#include "nodes/pg_list.h"
extern List *stringToQualifiedNameList(const char *string);
extern char *format_procedure(Oid procedure_oid);
extern char *format_procedure_qualified(Oid procedure_oid);
extern void format_procedure_parts(Oid operator_oid, List **objnames,
List **objargs);
extern char *format_operator(Oid operator_oid);
extern char *format_operator_qualified(Oid operator_oid);
extern void format_operator_parts(Oid operator_oid, List **objnames,
List **objargs);
#endif
/*-------------------------------------------------------------------------
*
* varlena.h
* Functions for the variable-length built-in types.
*
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/utils/varlena.h
*
*-------------------------------------------------------------------------
*/
#ifndef VARLENA_H
#define VARLENA_H
#include "nodes/pg_list.h"
#include "utils/sortsupport.h"
extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid);
extern void varstr_sortsupport(SortSupport ssup, Oid collid, bool bpchar);
extern int varstr_levenshtein(const char *source, int slen,
const char *target, int tlen,
int ins_c, int del_c, int sub_c,
bool trusted);
extern int varstr_levenshtein_less_equal(const char *source, int slen,
const char *target, int tlen,
int ins_c, int del_c, int sub_c,
int max_d, bool trusted);
extern List *textToQualifiedNameList(text *textval);
extern bool SplitIdentifierString(char *rawstring, char separator,
List **namelist);
extern bool SplitDirectoriesString(char *rawstring, char separator,
List **namelist);
extern text *replace_text_regexp(text *src_text, void *regexp,
text *replace_text, bool glob);
#endif
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "utils/guc.h" #include "utils/guc.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/memutils.h" #include "utils/memutils.h"
#include "utils/regproc.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "utils/guc.h" #include "utils/guc.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/syscache.h" #include "utils/syscache.h"
#include "utils/varlena.h"
static bool plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source); static bool plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment