|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <math.h>#include <limits.h>#include "access/sysattr.h"#include "access/table.h"#include "access/tableam.h"#include "catalog/namespace.h"#include "catalog/pg_type.h"#include "common/hashfn.h"#include "libpq/pqformat.h"#include "miscadmin.h"#include "parser/parsetree.h"#include "utils/acl.h"#include "utils/fmgrprotos.h"#include "utils/lsyscache.h"#include "utils/rel.h"#include "utils/snapmgr.h"#include "utils/varlena.h"
Go to the source code of this file.
Macros | |
| #define | LDELIM '(' |
| #define | RDELIM ')' |
| #define | DELIM ',' |
| #define | NTIDARGS 2 |
Functions | |
| static ItemPointer | currtid_for_view (Relation viewrel, const ItemPointerData *tid) |
| Datum | tidin (PG_FUNCTION_ARGS) |
| Datum | tidout (PG_FUNCTION_ARGS) |
| Datum | tidrecv (PG_FUNCTION_ARGS) |
| Datum | tidsend (PG_FUNCTION_ARGS) |
| Datum | tideq (PG_FUNCTION_ARGS) |
| Datum | tidne (PG_FUNCTION_ARGS) |
| Datum | tidlt (PG_FUNCTION_ARGS) |
| Datum | tidle (PG_FUNCTION_ARGS) |
| Datum | tidgt (PG_FUNCTION_ARGS) |
| Datum | tidge (PG_FUNCTION_ARGS) |
| Datum | bttidcmp (PG_FUNCTION_ARGS) |
| Datum | tidlarger (PG_FUNCTION_ARGS) |
| Datum | tidsmaller (PG_FUNCTION_ARGS) |
| Datum | hashtid (PG_FUNCTION_ARGS) |
| Datum | hashtidextended (PG_FUNCTION_ARGS) |
| static ItemPointer | currtid_internal (Relation rel, const ItemPointerData *tid) |
| Datum | currtid_byrelname (PG_FUNCTION_ARGS) |
| Datum bttidcmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 230 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_INT32.
| Datum currtid_byrelname | ( | PG_FUNCTION_ARGS | ) |
Definition at line 418 of file tid.c.
References AccessShareLock, currtid_internal(), makeRangeVarFromNameList(), PG_GETARG_ITEMPOINTER, PG_GETARG_TEXT_PP, PG_RETURN_ITEMPOINTER, relname, table_close(), table_openrv(), and textToQualifiedNameList().
|
static |
Definition at line 338 of file tid.c.
References AccessShareLock, RewriteRule::actions, CMD_SELECT, currtid_internal(), elog, ereport, errcode(), errmsg(), ERROR, RewriteRule::event, TargetEntry::expr, get_tle_by_resno(), i, if(), IS_SPECIAL_VARNO, IsA, linitial, list_length(), NameStr, TupleDescData::natts, RuleLock::numLocks, RelationData::rd_rules, RelationGetDescr, rt_fetch, Query::rtable, RuleLock::rules, SelfItemPointerAttributeNumber, table_close(), table_open(), Query::targetList, TupleDescAttr(), Var::varattno, and Var::varno.
Referenced by currtid_internal().
|
static |
Definition at line 296 of file tid.c.
References ACL_SELECT, aclcheck_error(), ACLCHECK_OK, currtid_for_view(), ereport, errcode(), errmsg(), ERROR, get_namespace_name(), get_relkind_objtype(), GetLatestSnapshot(), GetUserId(), ItemPointerCopy(), palloc(), pg_class_aclcheck(), RelationData::rd_rel, RegisterSnapshot(), RelationGetNamespace, RelationGetRelationName, RelationGetRelid, table_beginscan_tid(), table_endscan(), table_tuple_get_latest_tid(), and UnregisterSnapshot().
Referenced by currtid_byrelname(), and currtid_for_view().
| Datum hashtid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 257 of file tid.c.
References hash_any(), sort-test::key, and PG_GETARG_ITEMPOINTER.
| Datum hashtidextended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 272 of file tid.c.
References hash_any_extended(), sort-test::key, PG_GETARG_INT64, and PG_GETARG_ITEMPOINTER.
| Datum tideq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 176 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_BOOL.
| Datum tidge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 221 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_BOOL.
| Datum tidgt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 212 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_BOOL.
| Datum tidin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 52 of file tid.c.
References DELIM, ereturn, errcode(), errmsg(), i, ItemPointerSet(), LDELIM, NTIDARGS, palloc(), PG_GETARG_CSTRING, PG_RETURN_ITEMPOINTER, RDELIM, and str.
Referenced by make_tuple_from_result_row().
| Datum tidlarger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 239 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_ITEMPOINTER.
| Datum tidle | ( | PG_FUNCTION_ARGS | ) |
Definition at line 203 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_BOOL.
| Datum tidlt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 194 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_BOOL.
| Datum tidne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 185 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_BOOL.
| Datum tidout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 119 of file tid.c.
References buf, ItemPointerGetBlockNumberNoCheck(), ItemPointerGetOffsetNumberNoCheck(), PG_GETARG_ITEMPOINTER, PG_RETURN_CSTRING, pstrdup(), and snprintf.
Referenced by pgrowlocks().
| Datum tidrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 139 of file tid.c.
References buf, ItemPointerSet(), palloc(), PG_GETARG_POINTER, PG_RETURN_ITEMPOINTER, and pq_getmsgint().
| Datum tidsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 160 of file tid.c.
References buf, ItemPointerGetBlockNumberNoCheck(), ItemPointerGetOffsetNumberNoCheck(), PG_GETARG_ITEMPOINTER, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendint16(), and pq_sendint32().
| Datum tidsmaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 248 of file tid.c.
References ItemPointerCompare(), PG_GETARG_ITEMPOINTER, and PG_RETURN_ITEMPOINTER.