PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include "access/attnum.h"
#include "common/shortest_dec.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/bitmapset.h"
#include "nodes/nodes.h"
#include "nodes/pg_list.h"
#include "utils/datum.h"
#include "outfuncs.funcs.c"
#include "outfuncs.switch.c"
Go to the source code of this file.
Macros | |
#define | WRITE_NODE_TYPE(nodelabel) appendStringInfoString(str, nodelabel) |
#define | WRITE_INT_FIELD(fldname) appendStringInfo(str, " :" CppAsString(fldname) " %d", node->fldname) |
#define | WRITE_UINT_FIELD(fldname) appendStringInfo(str, " :" CppAsString(fldname) " %u", node->fldname) |
#define | WRITE_UINT64_FIELD(fldname) |
#define | WRITE_OID_FIELD(fldname) appendStringInfo(str, " :" CppAsString(fldname) " %u", node->fldname) |
#define | WRITE_LONG_FIELD(fldname) appendStringInfo(str, " :" CppAsString(fldname) " %ld", node->fldname) |
#define | WRITE_CHAR_FIELD(fldname) |
#define | WRITE_ENUM_FIELD(fldname, enumtype) |
#define | WRITE_FLOAT_FIELD(fldname) |
#define | WRITE_BOOL_FIELD(fldname) |
#define | WRITE_STRING_FIELD(fldname) |
#define | WRITE_LOCATION_FIELD(fldname) appendStringInfo(str, " :" CppAsString(fldname) " %d", node->fldname) |
#define | WRITE_NODE_FIELD(fldname) |
#define | WRITE_BITMAPSET_FIELD(fldname) |
#define | WRITE_NODE_ARRAY(fldname, len) |
#define | WRITE_ATTRNUMBER_ARRAY(fldname, len) |
#define | WRITE_OID_ARRAY(fldname, len) |
#define | WRITE_INDEX_ARRAY(fldname, len) |
#define | WRITE_INT_ARRAY(fldname, len) |
#define | WRITE_BOOL_ARRAY(fldname, len) |
#define | booltostr(x) ((x) ? "true" : "false") |
#define | WRITE_SCALAR_ARRAY(fnname, datatype, fmtstr, convfunc) |
Functions | |
static void | outChar (StringInfo str, char c) |
static void | outDouble (StringInfo str, double d) |
void | outToken (StringInfo str, const char *s) |
static void | writeNodeArray (StringInfo str, const Node *const *arr, int len) |
static void | _outList (StringInfo str, const List *node) |
void | outBitmapset (StringInfo str, const Bitmapset *bms) |
void | outDatum (StringInfo str, Datum value, int typlen, bool typbyval) |
static void | _outConst (StringInfo str, const Const *node) |
static void | _outBoolExpr (StringInfo str, const BoolExpr *node) |
static void | _outForeignKeyOptInfo (StringInfo str, const ForeignKeyOptInfo *node) |
static void | _outEquivalenceClass (StringInfo str, const EquivalenceClass *node) |
static void | _outExtensibleNode (StringInfo str, const ExtensibleNode *node) |
static void | _outRangeTblEntry (StringInfo str, const RangeTblEntry *node) |
static void | _outA_Expr (StringInfo str, const A_Expr *node) |
static void | _outInteger (StringInfo str, const Integer *node) |
static void | _outFloat (StringInfo str, const Float *node) |
static void | _outBoolean (StringInfo str, const Boolean *node) |
static void | _outString (StringInfo str, const String *node) |
static void | _outBitString (StringInfo str, const BitString *node) |
static void | _outA_Const (StringInfo str, const A_Const *node) |
static void | _outConstraint (StringInfo str, const Constraint *node) |
void | outNode (StringInfo str, const void *obj) |
char * | nodeToString (const void *obj) |
char * | bmsToString (const Bitmapset *bms) |
Definition at line 133 of file outfuncs.c.
#define WRITE_ATTRNUMBER_ARRAY | ( | fldname, | |
len | |||
) |
Definition at line 109 of file outfuncs.c.
#define WRITE_BITMAPSET_FIELD | ( | fldname | ) |
Definition at line 99 of file outfuncs.c.
#define WRITE_BOOL_ARRAY | ( | fldname, | |
len | |||
) |
Definition at line 129 of file outfuncs.c.
#define WRITE_BOOL_FIELD | ( | fldname | ) |
Definition at line 80 of file outfuncs.c.
#define WRITE_CHAR_FIELD | ( | fldname | ) |
Definition at line 65 of file outfuncs.c.
#define WRITE_ENUM_FIELD | ( | fldname, | |
enumtype | |||
) |
Definition at line 70 of file outfuncs.c.
#define WRITE_FLOAT_FIELD | ( | fldname | ) |
Definition at line 75 of file outfuncs.c.
#define WRITE_INDEX_ARRAY | ( | fldname, | |
len | |||
) |
Definition at line 119 of file outfuncs.c.
#define WRITE_INT_ARRAY | ( | fldname, | |
len | |||
) |
Definition at line 124 of file outfuncs.c.
#define WRITE_INT_FIELD | ( | fldname | ) | appendStringInfo(str, " :" CppAsString(fldname) " %d", node->fldname) |
Definition at line 44 of file outfuncs.c.
#define WRITE_LOCATION_FIELD | ( | fldname | ) | appendStringInfo(str, " :" CppAsString(fldname) " %d", node->fldname) |
Definition at line 90 of file outfuncs.c.
#define WRITE_LONG_FIELD | ( | fldname | ) | appendStringInfo(str, " :" CppAsString(fldname) " %ld", node->fldname) |
Definition at line 61 of file outfuncs.c.
#define WRITE_NODE_ARRAY | ( | fldname, | |
len | |||
) |
Definition at line 104 of file outfuncs.c.
#define WRITE_NODE_FIELD | ( | fldname | ) |
Definition at line 94 of file outfuncs.c.
#define WRITE_NODE_TYPE | ( | nodelabel | ) | appendStringInfoString(str, nodelabel) |
Definition at line 40 of file outfuncs.c.
#define WRITE_OID_ARRAY | ( | fldname, | |
len | |||
) |
Definition at line 114 of file outfuncs.c.
#define WRITE_OID_FIELD | ( | fldname | ) | appendStringInfo(str, " :" CppAsString(fldname) " %u", node->fldname) |
Definition at line 57 of file outfuncs.c.
#define WRITE_SCALAR_ARRAY | ( | fnname, | |
datatype, | |||
fmtstr, | |||
convfunc | |||
) |
Definition at line 224 of file outfuncs.c.
#define WRITE_STRING_FIELD | ( | fldname | ) |
Definition at line 85 of file outfuncs.c.
#define WRITE_UINT64_FIELD | ( | fldname | ) |
Definition at line 52 of file outfuncs.c.
#define WRITE_UINT_FIELD | ( | fldname | ) | appendStringInfo(str, " :" CppAsString(fldname) " %u", node->fldname) |
Definition at line 48 of file outfuncs.c.
|
static |
Definition at line 687 of file outfuncs.c.
References appendStringInfoString(), A_Const::isnull, outNode(), generate_unaccent_rules::str, A_Const::val, WRITE_LOCATION_FIELD, and WRITE_NODE_TYPE.
|
static |
Definition at line 572 of file outfuncs.c.
References AEXPR_BETWEEN, AEXPR_BETWEEN_SYM, AEXPR_DISTINCT, AEXPR_ILIKE, AEXPR_IN, AEXPR_LIKE, AEXPR_NOT_BETWEEN, AEXPR_NOT_BETWEEN_SYM, AEXPR_NOT_DISTINCT, AEXPR_NULLIF, AEXPR_OP, AEXPR_OP_ALL, AEXPR_OP_ANY, AEXPR_SIMILAR, appendStringInfoString(), elog(), ERROR, A_Expr::kind, name, generate_unaccent_rules::str, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.
|
static |
Definition at line 680 of file outfuncs.c.
References appendStringInfoString(), BitString::bsval, and generate_unaccent_rules::str.
Referenced by outNode().
|
static |
Definition at line 660 of file outfuncs.c.
References appendStringInfoString(), Boolean::boolval, and generate_unaccent_rules::str.
Referenced by outNode().
|
static |
Definition at line 399 of file outfuncs.c.
References AND_EXPR, appendStringInfoString(), generate_unaccent_rules::args, BoolExpr::boolop, NOT_EXPR, OR_EXPR, outToken(), generate_unaccent_rules::str, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.
|
static |
Definition at line 379 of file outfuncs.c.
References appendStringInfoString(), outDatum(), generate_unaccent_rules::str, WRITE_BOOL_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.
|
static |
Definition at line 702 of file outfuncs.c.
References appendStringInfoString(), CONSTR_ATTR_DEFERRABLE, CONSTR_ATTR_DEFERRED, CONSTR_ATTR_IMMEDIATE, CONSTR_ATTR_NOT_DEFERRABLE, CONSTR_CHECK, CONSTR_DEFAULT, CONSTR_EXCLUSION, CONSTR_FOREIGN, CONSTR_GENERATED, CONSTR_IDENTITY, CONSTR_NOTNULL, CONSTR_NULL, CONSTR_PRIMARY, CONSTR_UNIQUE, Constraint::contype, elog(), ERROR, generate_unaccent_rules::str, WRITE_BOOL_FIELD, WRITE_CHAR_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_STRING_FIELD.
|
static |
Definition at line 452 of file outfuncs.c.
References EquivalenceClass::ec_merged, WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_UINT_FIELD.
|
static |
Definition at line 478 of file outfuncs.c.
References ExtensibleNode::extnodename, GetExtensibleNodeMethods(), ExtensibleNodeMethods::nodeOut, generate_unaccent_rules::str, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.
|
static |
Definition at line 650 of file outfuncs.c.
References appendStringInfoString(), Float::fval, and generate_unaccent_rules::str.
Referenced by outNode().
|
static |
Definition at line 426 of file outfuncs.c.
References appendStringInfo(), appendStringInfoString(), ForeignKeyOptInfo::eclass, i, list_length(), ForeignKeyOptInfo::nkeys, ForeignKeyOptInfo::rinfos, generate_unaccent_rules::str, WRITE_ATTRNUMBER_ARRAY, WRITE_INT_FIELD, WRITE_NODE_TYPE, WRITE_OID_ARRAY, and WRITE_UINT_FIELD.
|
static |
Definition at line 644 of file outfuncs.c.
References appendStringInfo(), Integer::ival, and generate_unaccent_rules::str.
Referenced by outNode().
|
static |
Definition at line 272 of file outfuncs.c.
References appendStringInfo(), appendStringInfoChar(), elog(), ERROR, IsA, lfirst, lfirst_int, lfirst_oid, lfirst_xid, lnext(), outNode(), generate_unaccent_rules::str, and List::type.
Referenced by outNode().
|
static |
Definition at line 493 of file outfuncs.c.
References elog(), ERROR, functions, RTE_CTE, RTE_FUNCTION, RTE_JOIN, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RangeTblEntry::rtekind, WRITE_BOOL_FIELD, WRITE_CHAR_FIELD, WRITE_ENUM_FIELD, WRITE_FLOAT_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, WRITE_STRING_FIELD, and WRITE_UINT_FIELD.
|
static |
Definition at line 666 of file outfuncs.c.
References appendStringInfoChar(), outToken(), generate_unaccent_rules::str, and String::sval.
Referenced by outNode().
char* bmsToString | ( | const Bitmapset * | bms | ) |
Definition at line 892 of file outfuncs.c.
References initStringInfo(), outBitmapset(), and generate_unaccent_rules::str.
Referenced by search_indexed_tlist_for_phv(), and search_indexed_tlist_for_var().
char* nodeToString | ( | const void * | obj | ) |
Definition at line 877 of file outfuncs.c.
References initStringInfo(), outNode(), and generate_unaccent_rules::str.
Referenced by AlterDomainDefault(), AlterPolicy(), CreatePolicy(), CreateStatistics(), CreateTriggerFiringOn(), DefineDomain(), DetachAddConstraintIfNeeded(), domainAddConstraint(), elog_node_display(), ExecSerializePlan(), expandTableLikeClause(), InsertRule(), pg_parse_query(), pg_plan_query(), pg_rewrite_query(), pprint(), print(), ProcedureCreate(), publication_add_relation(), StoreAttrDefault(), StorePartitionBound(), StorePartitionKey(), StoreRelCheck(), and UpdateIndexRelation().
void outBitmapset | ( | StringInfo | str, |
const Bitmapset * | bms | ||
) |
Definition at line 322 of file outfuncs.c.
References appendStringInfo(), appendStringInfoChar(), bms_next_member(), generate_unaccent_rules::str, and x.
Referenced by bmsToString(), and outNode().
|
static |
Definition at line 187 of file outfuncs.c.
References appendStringInfoString(), outToken(), and generate_unaccent_rules::str.
void outDatum | ( | StringInfo | str, |
Datum | value, | ||
int | typlen, | ||
bool | typbyval | ||
) |
Definition at line 338 of file outfuncs.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), DatumGetPointer(), datumGetSize(), i, PointerIsValid, generate_unaccent_rules::str, and value.
Referenced by _outConst().
|
static |
Definition at line 208 of file outfuncs.c.
References appendStringInfoString(), buf, DOUBLE_SHORTEST_DECIMAL_LEN, double_to_shortest_decimal_buf(), and generate_unaccent_rules::str.
void outNode | ( | StringInfo | str, |
const void * | obj | ||
) |
Definition at line 828 of file outfuncs.c.
References _outBitString(), _outBoolean(), _outFloat(), _outInteger(), _outList(), _outString(), appendStringInfoChar(), appendStringInfoString(), check_stack_depth(), elog(), IsA, nodeTag, outBitmapset(), generate_unaccent_rules::str, and WARNING.
Referenced by _outA_Const(), _outList(), nodeToString(), and writeNodeArray().
void outToken | ( | StringInfo | str, |
const char * | s | ||
) |
Definition at line 146 of file outfuncs.c.
References appendStringInfoChar(), appendStringInfoString(), and generate_unaccent_rules::str.
Referenced by _outBoolExpr(), _outString(), and outChar().
|
static |
Definition at line 252 of file outfuncs.c.
References appendStringInfoChar(), appendStringInfoString(), i, len, outNode(), and generate_unaccent_rules::str.