|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/transam.h"#include "catalog/pg_proc.h"#include "common/hashfn.h"#include "common/int.h"#include "miscadmin.h"#include "nodes/nodeFuncs.h"#include "nodes/queryjumble.h"#include "utils/lsyscache.h"#include "parser/scanner.h"#include "parser/scansup.h"#include "queryjumblefuncs.funcs.c"#include "queryjumblefuncs.switch.c"
Go to the source code of this file.
Macros | |
| #define | JUMBLE_SIZE 1024 /* query serialization buffer size */ |
| #define | JUMBLE_NODE(item) _jumbleNode(jstate, (Node *) expr->item) |
| #define | JUMBLE_ELEMENTS(list, node) _jumbleElements(jstate, (List *) expr->list, node) |
| #define | JUMBLE_LOCATION(location) RecordConstLocation(jstate, false, expr->location, -1) |
| #define | JUMBLE_FIELD(item) |
| #define | JUMBLE_STRING(str) |
| #define | JUMBLE_CUSTOM(nodetype, item) _jumble##nodetype##_##item(jstate, expr, expr->item) |
Variables | |
| int | compute_query_id = COMPUTE_QUERY_ID_AUTO |
| bool | query_id_enabled = false |
Definition at line 557 of file queryjumblefuncs.c.
| #define JUMBLE_ELEMENTS | ( | list, | |
| node | |||
| ) | _jumbleElements(jstate, (List *) expr->list, node) |
Definition at line 532 of file queryjumblefuncs.c.
| #define JUMBLE_FIELD | ( | item | ) |
Definition at line 536 of file queryjumblefuncs.c.
| #define JUMBLE_LOCATION | ( | location | ) | RecordConstLocation(jstate, false, expr->location, -1) |
Definition at line 534 of file queryjumblefuncs.c.
| #define JUMBLE_NODE | ( | item | ) | _jumbleNode(jstate, (Node *) expr->item) |
Definition at line 530 of file queryjumblefuncs.c.
| #define JUMBLE_SIZE 1024 /* query serialization buffer size */ |
Definition at line 51 of file queryjumblefuncs.c.
Definition at line 549 of file queryjumblefuncs.c.
|
static |
Definition at line 712 of file queryjumblefuncs.c.
References elog, ERROR, fb(), A_Const::isnull, JUMBLE_FIELD, JUMBLE_STRING, nodeTag, A_Const::val, and val.
|
static |
Definition at line 649 of file queryjumblefuncs.c.
References _jumbleNode(), fb(), IsA, IsSquashableConstantList(), and RecordConstLocation().
|
static |
Definition at line 608 of file queryjumblefuncs.c.
References _jumbleNode(), AppendJumble32(), elog, ERROR, fb(), lfirst, lfirst_int, lfirst_oid, lfirst_xid, and List::type.
Referenced by _jumbleNode().
|
static |
Definition at line 563 of file queryjumblefuncs.c.
References _jumbleList(), AppendJumbleNull(), Assert, check_stack_depth(), elog, fb(), JUMBLE_FIELD, nodeTag, type, and WARNING.
Referenced by _jumbleElements(), _jumbleList(), and DoJumble().
|
static |
Definition at line 682 of file queryjumblefuncs.c.
References fb(), JUMBLE_FIELD, Param::location, PARAM_EXTERN, Param::paramid, Param::paramkind, and RecordConstLocation().
|
static |
Definition at line 767 of file queryjumblefuncs.c.
References JUMBLE_FIELD, JUMBLE_STRING, and type.
|
static |
Definition at line 746 of file queryjumblefuncs.c.
References VariableSetStmt::jumble_args, JUMBLE_FIELD, JUMBLE_LOCATION, JUMBLE_NODE, JUMBLE_STRING, and name.
|
static |
Definition at line 299 of file queryjumblefuncs.c.
References AppendJumbleInternal(), fb(), FlushPendingNulls(), and value.
|
static |
Definition at line 336 of file queryjumblefuncs.c.
References AppendJumbleInternal(), fb(), FlushPendingNulls(), and value.
|
static |
Definition at line 350 of file queryjumblefuncs.c.
References AppendJumbleInternal(), fb(), FlushPendingNulls(), and value.
Referenced by _jumbleList().
|
static |
Definition at line 364 of file queryjumblefuncs.c.
References AppendJumbleInternal(), fb(), FlushPendingNulls(), and value.
|
static |
Definition at line 322 of file queryjumblefuncs.c.
References AppendJumbleInternal(), fb(), FlushPendingNulls(), and value.
|
static |
Definition at line 236 of file queryjumblefuncs.c.
References Assert, DatumGetInt64(), fb(), hash_any_extended(), JUMBLE_SIZE, likely, memcpy(), Min, and unlikely.
Referenced by AppendJumble(), AppendJumble16(), AppendJumble32(), AppendJumble64(), AppendJumble8(), and FlushPendingNulls().
|
static |
Definition at line 88 of file queryjumblefuncs.c.
References Assert, fb(), len, and scanner_isspace().
Referenced by pgss_store(), and script_error_callback().
Definition at line 783 of file queryjumblefuncs.c.
References a, b, and pg_cmp_s32().
Referenced by ComputeConstantLengths().
| LocationLen * ComputeConstantLengths | ( | const JumbleState * | jstate, |
| const char * | query, | ||
| int | query_loc | ||
| ) |
Definition at line 822 of file queryjumblefuncs.c.
References Assert, CompLocation(), core_yylex(), fb(), i, memcpy(), palloc_array, qsort, ScanKeywords, ScanKeywordTokens, scanner_finish(), scanner_init(), yyextra, and yylloc.
Referenced by generate_normalized_query().
|
static |
Definition at line 211 of file queryjumblefuncs.c.
References _jumbleNode(), DatumGetInt64(), fb(), FlushPendingNulls(), and hash_any_extended().
Referenced by JumbleQuery().
Definition at line 171 of file queryjumblefuncs.c.
References compute_query_id, COMPUTE_QUERY_ID_OFF, and query_id_enabled.
Referenced by _PG_init().
|
static |
Definition at line 379 of file queryjumblefuncs.c.
References AppendJumbleInternal(), Assert, and fb().
Referenced by AppendJumble(), AppendJumble16(), AppendJumble32(), AppendJumble64(), AppendJumble8(), and DoJumble().
|
static |
Definition at line 182 of file queryjumblefuncs.c.
References fb(), JUMBLE_SIZE, palloc(), and palloc_object.
Referenced by JumbleQuery().
Definition at line 439 of file queryjumblefuncs.c.
References arg, FuncExpr::args, castNode, COERCE_EXPLICIT_CAST, COERCE_IMPLICIT_CAST, element(), fb(), FirstGenbkiObjectId, foreach_current_index, FuncExpr::funcid, IsA, IsSquashableConstant(), lfirst, nodeTag, PARAM_EXTERN, and stack_is_too_deep().
Referenced by IsSquashableConstant(), and IsSquashableConstantList().
Definition at line 513 of file queryjumblefuncs.c.
References fb(), IsSquashableConstant(), lfirst, and list_length().
Referenced by _jumbleElements().
| JumbleState * JumbleQuery | ( | Query * | query | ) |
Definition at line 139 of file queryjumblefuncs.c.
References Assert, DoJumble(), fb(), InitJumble(), INT64CONST, IsQueryIdEnabled(), and Query::utilityStmt.
Referenced by ExecCreateTableAs(), ExplainOneUtility(), ExplainQuery(), parse_analyze_fixedparams(), parse_analyze_varparams(), parse_analyze_withcb(), and PerformCursorOpen().
|
static |
Definition at line 400 of file queryjumblefuncs.c.
References Assert, fb(), len, and repalloc().
Referenced by _jumbleElements(), and _jumbleParam().
| int compute_query_id = COMPUTE_QUERY_ID_AUTO |
Definition at line 54 of file queryjumblefuncs.c.
Referenced by EnableQueryId(), ExplainPrintPlan(), and IsQueryIdEnabled().
Definition at line 63 of file queryjumblefuncs.c.
Referenced by EnableQueryId(), and IsQueryIdEnabled().