|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "catalog/pg_type.h"#include "nodes/makefuncs.h"#include "nodes/nodeFuncs.h"#include "optimizer/optimizer.h"#include "parser/parse_clause.h"#include "parser/parse_collate.h"#include "parser/parse_expr.h"#include "parser/parse_relation.h"#include "parser/parse_type.h"#include "utils/fmgrprotos.h"#include "utils/json.h"#include "utils/lsyscache.h"
Go to the source code of this file.
Data Structures | |
| struct | JsonTableParseContext |
Typedefs | |
| typedef struct JsonTableParseContext | JsonTableParseContext |
|
static |
Definition at line 378 of file parse_jsontable.c.
References assign_expr_collations(), castNode, TableFunc::docexpr, elog, ereport, errcode(), errmsg, ERROR, EXPR_KIND_FROM_FUNCTION, exprCollation(), exprType(), exprTypmod(), fb(), InvalidOid, isCompositeType(), JS_QUOTES_UNSPEC, JSW_UNSPEC, JTC_EXISTS, JTC_FOR_ORDINALITY, JTC_FORMATTED, JTC_NESTED, JTC_REGULAR, lappend(), lappend_int(), lappend_oid(), lfirst, makeNode, makeString(), parser_errposition(), pg_fallthrough, JsonTableParseContext::pstate, pstrdup(), JsonTableParseContext::tf, transformExpr(), transformJsonTableColumn(), CaseTestExpr::typeId, and typenameTypeIdAndMod().
Referenced by transformJsonTableColumns().
|
static |
Definition at line 199 of file parse_jsontable.c.
References castNode, CheckDuplicateColumnOrPathNames(), ereport, errcode(), errmsg, ERROR, fb(), JTC_NESTED, lappend(), lfirst, LookupPathOrColumnName(), parser_errposition(), JsonTableParseContext::pathNames, and JsonTableParseContext::pstate.
Referenced by CheckDuplicateColumnOrPathNames(), and transformJsonTable().
|
static |
Definition at line 729 of file parse_jsontable.c.
References Assert, collectSiblingPathsInJsonTablePlan(), elog, ERROR, JSTP_JOIN_CROSS, JSTP_JOIN_INNER, JSTP_JOIN_OUTER, JSTP_JOIN_UNION, JSTP_JOINED, JSTP_SIMPLE, lappend(), and plan.
Referenced by collectSiblingPathsInJsonTablePlan(), and validateJsonTableChildPlan().
|
static |
Definition at line 547 of file parse_jsontable.c.
References castNode, fb(), JTC_NESTED, and lfirst.
Referenced by transformJsonTableNestedColumns().
|
static |
Definition at line 257 of file parse_jsontable.c.
References fb(), lappend(), LookupPathOrColumnName(), name, JsonTableParseContext::pathNameId, JsonTableParseContext::pathNames, pstrdup(), and snprintf.
Referenced by transformJsonTable(), transformJsonTableNestedColumns(), and validateJsonTableChildPlan().
Definition at line 474 of file parse_jsontable.c.
References fb(), get_typtype(), getBaseType(), isCompositeType(), and type_is_array.
Referenced by AlterTypeNamespaceInternal(), appendJsonTableColumns(), and isCompositeType().
|
static |
Definition at line 242 of file parse_jsontable.c.
References fb(), lfirst, name, and JsonTableParseContext::pathNames.
Referenced by CheckDuplicateColumnOrPathNames(), and generateJsonTablePathName().
|
static |
Definition at line 673 of file parse_jsontable.c.
References Assert, castNode, JsonTablePathScan::child, JsonTablePathScan::colMax, JsonTablePathScan::colMin, CStringGetDatum(), DirectFunctionCall1, JsonTablePathScan::errorOnError, fb(), InvalidOid, IsA, JsonTablePlanSpec::join_type, jsonpath_in(), JSTP_JOIN_OUTER, makeConst(), makeJsonTablePath(), makeNode, JsonTablePathSpec::name, JsonTablePathScan::outerJoin, JsonTablePathScan::path, JsonTablePathScan::plan, JsonTablePathSpec::string, and value.
Referenced by transformJsonTableColumns().
|
static |
Definition at line 715 of file parse_jsontable.c.
References JsonTableSiblingJoin::cross, fb(), JsonTableSiblingJoin::lplan, makeNode, JsonTableSiblingJoin::plan, and JsonTableSiblingJoin::rplan.
Referenced by transformJsonTableNestedColumns().
| ParseNamespaceItem * transformJsonTable | ( | ParseState * | pstate, |
| JsonTable * | jt | ||
| ) |
Definition at line 84 of file parse_jsontable.c.
References addRangeTableEntryForTableFunc(), JsonTable::alias, Assert, JsonBehavior::btype, castNode, CheckDuplicateColumnOrPathNames(), JsonTable::columns, contain_vars_of_level(), JsonTable::context_item, copyObject, TableFunc::docexpr, ereport, errcode(), errdetail(), errmsg, ERROR, EXPR_KIND_FROM_FUNCTION, fb(), TableFunc::functype, generateJsonTablePathName(), IsA, JSON_BEHAVIOR_EMPTY, JSON_BEHAVIOR_EMPTY_ARRAY, JSON_BEHAVIOR_ERROR, JSON_TABLE_OP, JsonTableParseContext::jt, JsonTable::lateral, list_make1, JsonTable::location, TableFunc::location, JsonBehavior::location, makeNode, JsonTable::on_error, ParseState::p_lateral_active, parser_errposition(), JsonTable::passing, JsonTableParseContext::pathNameId, JsonTableParseContext::pathNames, JsonTable::pathspec, plan, JsonTable::planspec, JsonTableParseContext::tf, TFT_JSON_TABLE, transformExpr(), and transformJsonTableColumns().
Referenced by transformFromClauseItem().
|
static |
Definition at line 496 of file parse_jsontable.c.
References appendStringInfoString(), Assert, StringInfoData::data, escape_json(), fb(), initStringInfo(), JS_ENC_DEFAULT, JS_FORMAT_DEFAULT, JSON_EXISTS_OP, JSON_QUERY_OP, JSON_VALUE_OP, JTC_EXISTS, JTC_REGULAR, makeJsonFormat(), makeJsonValueExpr(), makeNode, makeStringConst(), and pstrdup().
Referenced by appendJsonTableColumns().
|
static |
Definition at line 286 of file parse_jsontable.c.
References appendJsonTableColumns(), Assert, JsonBehavior::btype, ereport, errcode(), errdetail(), errmsg, ERROR, fb(), JsonTablePlanSpec::join_type, JSON_BEHAVIOR_ERROR, JSTP_DEFAULT, JSTP_JOIN_INNER, JSTP_JOIN_OUTER, JSTP_JOINED, JsonTableParseContext::jt, list_length(), JsonTablePlanSpec::location, makeJsonTablePathScan(), JsonTablePathSpec::name, JsonTable::on_error, parser_errposition(), JsonTablePlanSpec::plan1, JsonTablePlanSpec::plan2, JsonTablePlanSpec::plan_type, JsonTableParseContext::pstate, JsonTableParseContext::tf, transformJsonTableNestedColumns(), and validateJsonTableChildPlan().
Referenced by transformJsonTable(), and transformJsonTableNestedColumns().
|
static |
Definition at line 574 of file parse_jsontable.c.
References Assert, castNode, elog, ERROR, fb(), findNestedJsonTableColumn(), generateJsonTablePathName(), JsonTablePlanSpec::join_type, JSTP_DEFAULT, JSTP_JOIN_CROSS, JSTP_JOIN_INNER, JSTP_JOIN_OUTER, JSTP_JOINED, JSTP_SIMPLE, JTC_NESTED, lfirst, makeJsonTableSiblingJoin(), JsonTablePlanSpec::pathname, plan, JsonTablePlanSpec::plan1, JsonTablePlanSpec::plan2, JsonTablePlanSpec::plan_type, transformJsonTableColumns(), and transformJsonTableNestedColumns().
Referenced by transformJsonTableColumns(), and transformJsonTableNestedColumns().
|
static |
Definition at line 760 of file parse_jsontable.c.
References castNode, collectSiblingPathsInJsonTablePlan(), ereport, errcode(), errdetail(), errmsg, ERROR, fb(), generateJsonTablePathName(), JTC_NESTED, lfirst, list_length(), NIL, parser_errposition(), plan, and JsonTableParseContext::pstate.
Referenced by transformJsonTableColumns().