⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscache.c

📁 关系型数据库 Postgresql 6.5.2
💻 C
📖 第 1 页 / 共 2 页
字号:
/*------------------------------------------------------------------------- * * syscache.c *	  System cache management routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *	  $Header: /usr/local/cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.28.2.1 1999/08/02 05:25:01 scrappy Exp $ * * NOTES *	  These routines allow the parser/planner/executor to perform *	  rapid lookups on the contents of the system catalogs. * *	  see catalog/syscache.h for a list of the cache id's * *------------------------------------------------------------------------- */#include "postgres.h"#include "access/heapam.h"#include "catalog/catname.h"#include "catalog/pg_aggregate.h"#include "catalog/pg_amop.h"#include "catalog/pg_group.h"#include "catalog/pg_index.h"#include "catalog/pg_inherits.h"#include "catalog/pg_language.h"#include "catalog/pg_listener.h"#include "catalog/pg_opclass.h"#include "catalog/pg_operator.h"#include "catalog/pg_proc.h"#include "catalog/pg_rewrite.h"#include "catalog/pg_shadow.h"#include "catalog/pg_type.h"#include "utils/catcache.h"extern bool AMI_OVERRIDE;		/* XXX style */#include "utils/syscache.h"#include "catalog/indexing.h"typedef HeapTuple (*ScanFunc) ();/* ---------------- *		Warning:  cacheinfo[] below is changed, then be sure and *		update the magic constants in syscache.h! * ---------------- */static struct cachedesc cacheinfo[] = {	{AccessMethodOperatorRelationName,	/* AMOPOPID */		3,		{			Anum_pg_amop_amopclaid,			Anum_pg_amop_amopopr,			Anum_pg_amop_amopid,			0		},		sizeof(FormData_pg_amop),		NULL,	(ScanFunc) NULL},	{AccessMethodOperatorRelationName,	/* AMOPSTRATEGY */		3,		{			Anum_pg_amop_amopid,			Anum_pg_amop_amopclaid,			Anum_pg_amop_amopstrategy,			0		},		sizeof(FormData_pg_amop),		NULL,	(ScanFunc) NULL},	{AttributeRelationName,		/* ATTNAME */		2,		{			Anum_pg_attribute_attrelid,			Anum_pg_attribute_attname,			0,			0		},		ATTRIBUTE_TUPLE_SIZE,		AttributeNameIndex,	(ScanFunc) AttributeNameIndexScan},	{AttributeRelationName,		/* ATTNUM */		2,		{			Anum_pg_attribute_attrelid,			Anum_pg_attribute_attnum,			0,			0		},		ATTRIBUTE_TUPLE_SIZE,		AttributeNumIndex,	(ScanFunc) AttributeNumIndexScan},	{IndexRelationName,			/* INDEXRELID */		1,		{			Anum_pg_index_indexrelid,			0,			0,			0		},		offsetof(FormData_pg_index, indpred),		NULL,	NULL},	{LanguageRelationName,		/* LANNAME */		1,		{			Anum_pg_language_lanname,			0,			0,			0		},		offsetof(FormData_pg_language, lancompiler),		NULL,	NULL},	{OperatorRelationName,		/* OPRNAME */		4,		{			Anum_pg_operator_oprname,			Anum_pg_operator_oprleft,			Anum_pg_operator_oprright,			Anum_pg_operator_oprkind		},		sizeof(FormData_pg_operator),		NULL,	NULL},	{OperatorRelationName,		/* OPROID */		1,		{			ObjectIdAttributeNumber,			0,			0,			0		},		sizeof(FormData_pg_operator),		NULL,	(ScanFunc) NULL},	{ProcedureRelationName,		/* PRONAME */		3,		{			Anum_pg_proc_proname,			Anum_pg_proc_pronargs,			Anum_pg_proc_proargtypes,			0		},		offsetof(FormData_pg_proc, prosrc),		ProcedureNameIndex,	(ScanFunc) ProcedureNameIndexScan},	{ProcedureRelationName,		/* PROOID */		1,		{			ObjectIdAttributeNumber,			0,			0,			0		},		offsetof(FormData_pg_proc, prosrc),		ProcedureOidIndex,	(ScanFunc) ProcedureOidIndexScan},	{RelationRelationName,		/* RELNAME */		1,		{			Anum_pg_class_relname,			0,			0,			0		},		CLASS_TUPLE_SIZE,		ClassNameIndex,	(ScanFunc) ClassNameIndexScan},	{RelationRelationName,		/* RELOID */		1,		{			ObjectIdAttributeNumber,			0,			0,			0		},		CLASS_TUPLE_SIZE,		ClassOidIndex,	(ScanFunc) ClassOidIndexScan},	{TypeRelationName,			/* TYPNAME */		1,		{			Anum_pg_type_typname,			0,			0,			0		},		offsetof(FormData_pg_type, typalign) +sizeof(char),		TypeNameIndex,	TypeNameIndexScan},	{TypeRelationName,			/* TYPOID */		1,		{			ObjectIdAttributeNumber,			0,			0,			0		},		offsetof(FormData_pg_type, typalign) +sizeof(char),		TypeOidIndex,	TypeOidIndexScan},	{AccessMethodRelationName,	/* AMNAME */		1,		{			Anum_pg_am_amname,			0,			0,			0		},		sizeof(FormData_pg_am),		NULL,	NULL},	{OperatorClassRelationName, /* CLANAME */		1,		{			Anum_pg_opclass_opcname,			0,			0,			0		},		sizeof(FormData_pg_opclass),		NULL,	NULL},	{IndexRelationName,			/* INDRELIDKEY *//* never used */		2,		{			Anum_pg_index_indrelid,			Anum_pg_index_indkey,			0,			0		},		offsetof(FormData_pg_index, indpred),		NULL,	(ScanFunc) NULL},	{InheritsRelationName,		/* INHRELID */		2,		{			Anum_pg_inherits_inhrel,			Anum_pg_inherits_inhseqno,			0,			0		},		sizeof(FormData_pg_inherits),		NULL,	(ScanFunc) NULL},	{RewriteRelationName,		/* RULOID */		1,		{			ObjectIdAttributeNumber,			0,			0,			0		},		offsetof(FormData_pg_rewrite, ev_qual),		NULL,	(ScanFunc) NULL},	{AggregateRelationName,		/* AGGNAME */		2,		{			Anum_pg_aggregate_aggname,			Anum_pg_aggregate_aggbasetype,			0,			0		},		offsetof(FormData_pg_aggregate, agginitval1),		NULL,	(ScanFunc) NULL},	{ListenerRelationName,		/* LISTENREL */		2,		{			Anum_pg_listener_relname,			Anum_pg_listener_pid,			0,			0		},		sizeof(FormData_pg_listener),		NULL,	(ScanFunc) NULL},	{ShadowRelationName,		/* USENAME */		1,		{			Anum_pg_shadow_usename,			0,			0,			0		},		sizeof(FormData_pg_shadow),		NULL,	(ScanFunc) NULL},	{ShadowRelationName,		/* USESYSID */		1,		{			Anum_pg_shadow_usesysid,			0,			0,			0		},		sizeof(FormData_pg_shadow),		NULL,	(ScanFunc) NULL},	{GroupRelationName,			/* GRONAME */		1,		{			Anum_pg_group_groname,			0,			0,			0		},		offsetof(FormData_pg_group, grolist[0]),		NULL,	(ScanFunc) NULL},	{GroupRelationName,			/* GROSYSID */		1,		{			Anum_pg_group_grosysid,			0,			0,			0		},		offsetof(FormData_pg_group, grolist[0]),		NULL,	(ScanFunc) NULL},	{RewriteRelationName,		/* REWRITENAME */		1,		{			Anum_pg_rewrite_rulename,			0,			0,			0		},		offsetof(FormData_pg_rewrite, ev_qual),		NULL,	(ScanFunc) NULL},	{ProcedureRelationName,		/* PROSRC */		1,		{			Anum_pg_proc_prosrc,			0,			0,			0		},		offsetof(FormData_pg_proc, prosrc),		ProcedureSrcIndex,	(ScanFunc) ProcedureSrcIndexScan},	{OperatorClassRelationName, /* CLADEFTYPE */		1,		{			Anum_pg_opclass_opcdeftype,			0,			0,			0		},		sizeof(FormData_pg_opclass),		NULL,	(ScanFunc) NULL},	{LanguageRelationName,		/* LANOID */		1,		{			ObjectIdAttributeNumber,			0,			0,			0		},		offsetof(FormData_pg_language, lancompiler),		NULL,	NULL}};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -