亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? namespace.c

?? PostgreSQL7.4.6 for Linux
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/*------------------------------------------------------------------------- * * namespace.c *	  code to support accessing and searching namespaces * * This is separate from pg_namespace.c, which contains the routines that * directly manipulate the pg_namespace system catalog.  This module * provides routines associated with defining a "namespace search path" * and implementing search-path-controlled searches. * * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION *	  $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.58 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */#include "postgres.h"#include "access/xact.h"#include "catalog/catname.h"#include "catalog/dependency.h"#include "catalog/namespace.h"#include "catalog/pg_conversion.h"#include "catalog/pg_namespace.h"#include "catalog/pg_opclass.h"#include "catalog/pg_operator.h"#include "catalog/pg_proc.h"#include "catalog/pg_shadow.h"#include "catalog/pg_type.h"#include "commands/dbcommands.h"#include "lib/stringinfo.h"#include "miscadmin.h"#include "nodes/makefuncs.h"#include "storage/backendid.h"#include "storage/ipc.h"#include "utils/acl.h"#include "utils/builtins.h"#include "utils/catcache.h"#include "utils/inval.h"#include "utils/lsyscache.h"#include "utils/memutils.h"#include "utils/syscache.h"/* * The namespace search path is a possibly-empty list of namespace OIDs. * In addition to the explicit list, several implicitly-searched namespaces * may be included: * * 1. If a "special" namespace has been set by PushSpecialNamespace, it is * always searched first.  (This is a hack for CREATE SCHEMA.) * * 2. If a TEMP table namespace has been initialized in this session, it * is always searched just after any special namespace. * * 3. The system catalog namespace is always searched.	If the system * namespace is present in the explicit path then it will be searched in * the specified order; otherwise it will be searched after TEMP tables and * *before* the explicit list.	(It might seem that the system namespace * should be implicitly last, but this behavior appears to be required by * SQL99.  Also, this provides a way to search the system namespace first * without thereby making it the default creation target namespace.) * * The default creation target namespace is normally equal to the first * element of the explicit list, but is the "special" namespace when one * has been set.  If the explicit list is empty and there is no special * namespace, there is no default target. * * In bootstrap mode, the search path is set equal to 'pg_catalog', so that * the system namespace is the only one searched or inserted into. * The initdb script is also careful to set search_path to 'pg_catalog' for * its post-bootstrap standalone backend runs.	Otherwise the default search * path is determined by GUC.  The factory default path contains the PUBLIC * namespace (if it exists), preceded by the user's personal namespace * (if one exists). * * If namespaceSearchPathValid is false, then namespaceSearchPath (and other * derived variables) need to be recomputed from namespace_search_path. * We mark it invalid upon an assignment to namespace_search_path or receipt * of a syscache invalidation event for pg_namespace.  The recomputation * is done during the next lookup attempt. * * Any namespaces mentioned in namespace_search_path that are not readable * by the current user ID are simply left out of namespaceSearchPath; so * we have to be willing to recompute the path when current userid changes. * namespaceUser is the userid the path has been computed for. */static List *namespaceSearchPath = NIL;static Oid	namespaceUser = InvalidOid;/* default place to create stuff; if InvalidOid, no default */static Oid	defaultCreationNamespace = InvalidOid;/* first explicit member of list; usually same as defaultCreationNamespace */static Oid	firstExplicitNamespace = InvalidOid;/* The above four values are valid only if namespaceSearchPathValid */static bool namespaceSearchPathValid = true;/* * myTempNamespace is InvalidOid until and unless a TEMP namespace is set up * in a particular backend session (this happens when a CREATE TEMP TABLE * command is first executed).	Thereafter it's the OID of the temp namespace. * firstTempTransaction flags whether we've committed creation of the TEMP * namespace or not. */static Oid	myTempNamespace = InvalidOid;static bool firstTempTransaction = false;/* * "Special" namespace for CREATE SCHEMA.  If set, it's the first search * path element, and also the default creation namespace. */static Oid	mySpecialNamespace = InvalidOid;/* * This is the text equivalent of the search path --- it's the value * of the GUC variable 'search_path'. */char	   *namespace_search_path = NULL;/* Local functions */static void recomputeNamespacePath(void);static void InitTempTableNamespace(void);static void RemoveTempRelations(Oid tempNamespaceId);static void RemoveTempRelationsCallback(void);static void NamespaceCallback(Datum arg, Oid relid);/* These don't really need to appear in any header file */Datum		pg_table_is_visible(PG_FUNCTION_ARGS);Datum		pg_type_is_visible(PG_FUNCTION_ARGS);Datum		pg_function_is_visible(PG_FUNCTION_ARGS);Datum		pg_operator_is_visible(PG_FUNCTION_ARGS);Datum		pg_opclass_is_visible(PG_FUNCTION_ARGS);Datum		pg_conversion_is_visible(PG_FUNCTION_ARGS);/* * RangeVarGetRelid *		Given a RangeVar describing an existing relation, *		select the proper namespace and look up the relation OID. * * If the relation is not found, return InvalidOid if failOK = true, * otherwise raise an error. */OidRangeVarGetRelid(const RangeVar *relation, bool failOK){	Oid			namespaceId;	Oid			relId;	/*	 * We check the catalog name and then ignore it.	 */	if (relation->catalogname)	{		if (strcmp(relation->catalogname, get_database_name(MyDatabaseId)) != 0)			ereport(ERROR,					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),			   errmsg("cross-database references are not implemented")));	}	if (relation->schemaname)	{		/* use exact schema given */		namespaceId = LookupExplicitNamespace(relation->schemaname);		relId = get_relname_relid(relation->relname, namespaceId);	}	else	{		/* search the namespace path */		relId = RelnameGetRelid(relation->relname);	}	if (!OidIsValid(relId) && !failOK)	{		if (relation->schemaname)			ereport(ERROR,					(errcode(ERRCODE_UNDEFINED_TABLE),					 errmsg("relation \"%s.%s\" does not exist",							relation->schemaname, relation->relname)));		else			ereport(ERROR,					(errcode(ERRCODE_UNDEFINED_TABLE),					 errmsg("relation \"%s\" does not exist",							relation->relname)));	}	return relId;}/* * RangeVarGetCreationNamespace *		Given a RangeVar describing a to-be-created relation, *		choose which namespace to create it in. * * Note: calling this may result in a CommandCounterIncrement operation. * That will happen on the first request for a temp table in any particular * backend run; we will need to either create or clean out the temp schema. */OidRangeVarGetCreationNamespace(const RangeVar *newRelation){	Oid			namespaceId;	/*	 * We check the catalog name and then ignore it.	 */	if (newRelation->catalogname)	{		if (strcmp(newRelation->catalogname, get_database_name(MyDatabaseId)) != 0)			ereport(ERROR,					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),			   errmsg("cross-database references are not implemented")));	}	if (newRelation->istemp)	{		/* TEMP tables are created in our backend-local temp namespace */		if (newRelation->schemaname)			ereport(ERROR,					(errcode(ERRCODE_INVALID_TABLE_DEFINITION),				   errmsg("temporary tables may not specify a schema name")));		/* Initialize temp namespace if first time through */		if (!OidIsValid(myTempNamespace))			InitTempTableNamespace();		return myTempNamespace;	}	if (newRelation->schemaname)	{		/* use exact schema given */		namespaceId = GetSysCacheOid(NAMESPACENAME,								CStringGetDatum(newRelation->schemaname),									 0, 0, 0);		if (!OidIsValid(namespaceId))			ereport(ERROR,					(errcode(ERRCODE_UNDEFINED_SCHEMA),					 errmsg("schema \"%s\" does not exist",							newRelation->schemaname)));		/* we do not check for USAGE rights here! */	}	else	{		/* use the default creation namespace */		recomputeNamespacePath();		namespaceId = defaultCreationNamespace;		if (!OidIsValid(namespaceId))			ereport(ERROR,					(errcode(ERRCODE_UNDEFINED_SCHEMA),					 errmsg("no schema has been selected to create in")));	}	/* Note: callers will check for CREATE rights when appropriate */	return namespaceId;}/* * RelnameGetRelid *		Try to resolve an unqualified relation name. *		Returns OID if relation found in search path, else InvalidOid. */OidRelnameGetRelid(const char *relname){	Oid			relid;	List	   *lptr;	recomputeNamespacePath();	foreach(lptr, namespaceSearchPath)	{		Oid			namespaceId = lfirsto(lptr);		relid = get_relname_relid(relname, namespaceId);		if (OidIsValid(relid))			return relid;	}	/* Not found in path */	return InvalidOid;}/* * RelationIsVisible *		Determine whether a relation (identified by OID) is visible in the *		current search path.  Visible means "would be found by searching *		for the unqualified relation name". */boolRelationIsVisible(Oid relid){	HeapTuple	reltup;	Form_pg_class relform;	Oid			relnamespace;	bool		visible;	reltup = SearchSysCache(RELOID,							ObjectIdGetDatum(relid),							0, 0, 0);	if (!HeapTupleIsValid(reltup))		elog(ERROR, "cache lookup failed for relation %u", relid);	relform = (Form_pg_class) GETSTRUCT(reltup);	recomputeNamespacePath();	/*	 * Quick check: if it ain't in the path at all, it ain't visible.	 * Items in the system namespace are surely in the path and so we	 * needn't even do oidMember() for them.	 */	relnamespace = relform->relnamespace;	if (relnamespace != PG_CATALOG_NAMESPACE &&		!oidMember(relnamespace, namespaceSearchPath))		visible = false;	else	{		/*		 * If it is in the path, it might still not be visible; it could		 * be hidden by another relation of the same name earlier in the		 * path. So we must do a slow check to see if this rel would be		 * found by RelnameGetRelid.		 */		char	   *relname = NameStr(relform->relname);		visible = (RelnameGetRelid(relname) == relid);	}	ReleaseSysCache(reltup);	return visible;}/* * TypenameGetTypid *		Try to resolve an unqualified datatype name. *		Returns OID if type found in search path, else InvalidOid. * * This is essentially the same as RelnameGetRelid. */OidTypenameGetTypid(const char *typname){	Oid			typid;	List	   *lptr;	recomputeNamespacePath();	foreach(lptr, namespaceSearchPath)	{		Oid			namespaceId = lfirsto(lptr);		typid = GetSysCacheOid(TYPENAMENSP,							   PointerGetDatum(typname),							   ObjectIdGetDatum(namespaceId),							   0, 0);		if (OidIsValid(typid))			return typid;	}	/* Not found in path */	return InvalidOid;}/* * TypeIsVisible *		Determine whether a type (identified by OID) is visible in the *		current search path.  Visible means "would be found by searching *		for the unqualified type name". */boolTypeIsVisible(Oid typid){	HeapTuple	typtup;	Form_pg_type typform;	Oid			typnamespace;	bool		visible;	typtup = SearchSysCache(TYPEOID,							ObjectIdGetDatum(typid),							0, 0, 0);	if (!HeapTupleIsValid(typtup))		elog(ERROR, "cache lookup failed for type %u", typid);	typform = (Form_pg_type) GETSTRUCT(typtup);	recomputeNamespacePath();	/*	 * Quick check: if it ain't in the path at all, it ain't visible.	 * Items in the system namespace are surely in the path and so we	 * needn't even do oidMember() for them.	 */	typnamespace = typform->typnamespace;	if (typnamespace != PG_CATALOG_NAMESPACE &&		!oidMember(typnamespace, namespaceSearchPath))		visible = false;	else	{		/*		 * If it is in the path, it might still not be visible; it could		 * be hidden by another type of the same name earlier in the path.		 * So we must do a slow check to see if this type would be found		 * by TypenameGetTypid.		 */		char	   *typname = NameStr(typform->typname);		visible = (TypenameGetTypid(typname) == typid);	}	ReleaseSysCache(typtup);	return visible;}/* * FuncnameGetCandidates *		Given a possibly-qualified function name and argument count, *		retrieve a list of the possible matches. * * If nargs is -1, we return all functions matching the given name, * regardless of argument count. * * We search a single namespace if the function name is qualified, else * all namespaces in the search path.  The return list will never contain * multiple entries with identical argument lists --- in the multiple- * namespace case, we arrange for entries in earlier namespaces to mask * identical entries in later namespaces. */FuncCandidateListFuncnameGetCandidates(List *names, int nargs){	FuncCandidateList resultList = NULL;	char	   *schemaname;	char	   *funcname;	Oid			namespaceId;	CatCList   *catlist;	int			i;	/* deconstruct the name list */	DeconstructQualifiedName(names, &schemaname, &funcname);	if (schemaname)	{		/* use exact schema given */		namespaceId = LookupExplicitNamespace(schemaname);	}	else	{		/* flag to indicate we need namespace search */		namespaceId = InvalidOid;		recomputeNamespacePath();	}	/* Search syscache by name and (optionally) nargs only */	if (nargs >= 0)		catlist = SearchSysCacheList(PROCNAMENSP, 2,									 CStringGetDatum(funcname),									 Int16GetDatum(nargs),									 0, 0);	else		catlist = SearchSysCacheList(PROCNAMENSP, 1,									 CStringGetDatum(funcname),									 0, 0, 0);	for (i = 0; i < catlist->n_members; i++)	{		HeapTuple	proctup = &catlist->members[i]->tuple;		Form_pg_proc procform = (Form_pg_proc) GETSTRUCT(proctup);		int			pathpos = 0;		FuncCandidateList newResult;		nargs = procform->pronargs;		if (OidIsValid(namespaceId))		{			/* Consider only procs in specified namespace */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品国产.久久久久久| 蜜桃精品视频在线| 欧美激情综合五月色丁香| 欧美精品99久久久**| 色婷婷久久久综合中文字幕 | 亚洲人亚洲人成电影网站色| 日韩美女主播在线视频一区二区三区| 91国偷自产一区二区开放时间| 丰满岳乱妇一区二区三区 | 喷白浆一区二区| 亚洲一区免费观看| 亚洲一区二区黄色| 肉色丝袜一区二区| 日本亚洲最大的色成网站www| 亚洲一区二区不卡免费| 婷婷中文字幕综合| 久久成人久久爱| 黑人巨大精品欧美黑白配亚洲| 毛片av中文字幕一区二区| 秋霞成人午夜伦在线观看| 青草国产精品久久久久久| 日本美女视频一区二区| 奇米色777欧美一区二区| 国产精品久久久久一区| 国产精品毛片a∨一区二区三区 | 精品亚洲免费视频| 国产福利一区二区三区视频在线 | 日韩一区二区三区在线| 精品成人一区二区三区四区| 国产精品麻豆欧美日韩ww| 亚洲国产中文字幕| 久久精品72免费观看| 成人精品视频一区二区三区 | 蜜乳av一区二区| 成人小视频在线| 欧美一区二区三区在线观看| 国产日韩欧美制服另类| 午夜一区二区三区视频| 国产老妇另类xxxxx| 欧美日本高清视频在线观看| 久久久久久久久久久久电影| 亚洲一二三四区| 国产大陆亚洲精品国产| 欧美一区二区日韩| 亚洲自拍另类综合| 粉嫩av一区二区三区在线播放| 最新国产精品久久精品| 美腿丝袜在线亚洲一区| 91丨九色丨蝌蚪富婆spa| 久久午夜免费电影| 三级成人在线视频| 欧美午夜精品久久久| 国产精品看片你懂得| 激情文学综合丁香| 日韩免费视频一区二区| 天天影视涩香欲综合网| 欧美色视频在线| 亚洲资源在线观看| 日本韩国欧美在线| 亚洲一区二区四区蜜桃| 色妹子一区二区| 亚洲免费大片在线观看| 91在线视频播放地址| 国产精品传媒视频| 99精品欧美一区二区蜜桃免费| 国产精品毛片久久久久久久| 懂色av中文字幕一区二区三区| 欧美mv和日韩mv的网站| 久久av资源站| 国产无一区二区| av一区二区三区| 亚洲影视在线播放| 欧美电影一区二区三区| 麻豆91精品视频| 国产精品麻豆欧美日韩ww| 91玉足脚交白嫩脚丫在线播放| 亚洲欧美色图小说| 色婷婷综合中文久久一本| a亚洲天堂av| 国产精品久久综合| 欧美日韩国产影片| 国产一区二区美女诱惑| 国产精品进线69影院| 欧美狂野另类xxxxoooo| 国产一区二区女| 亚洲va欧美va天堂v国产综合| 欧美精品一区二区久久婷婷| 99久久久无码国产精品| 欧美日韩一区视频| 日本午夜一区二区| 国产精品美女视频| 欧美成人vr18sexvr| 91影视在线播放| 黄网站免费久久| 亚洲图片自拍偷拍| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美性感一区二区三区| 不卡一区中文字幕| 久久精品国产精品青草| 亚洲资源中文字幕| 一区二区中文视频| 国产色一区二区| 欧美一二三区在线观看| 欧美日韩激情在线| 欧美三级电影在线看| 91丝袜美腿高跟国产极品老师| 国产很黄免费观看久久| 黑人巨大精品欧美一区| 精品一区二区综合| 日韩精品福利网| 午夜精品一区二区三区三上悠亚| 亚洲三级在线免费观看| 亚洲欧美偷拍卡通变态| 亚洲日本va午夜在线影院| 亚洲欧美色一区| 一区二区三区成人| 日韩成人伦理电影在线观看| 五月天激情综合网| 久久精品国产精品亚洲红杏| 久久狠狠亚洲综合| 日韩一级二级三级| 欧美丰满一区二区免费视频| 在线不卡中文字幕播放| 日韩一区二区影院| 国产亚洲欧美在线| 亚洲视频图片小说| 日韩国产精品大片| 蜜桃精品视频在线观看| 久久99久久99精品免视看婷婷 | 成人深夜在线观看| 色婷婷精品久久二区二区蜜臀av | 欧美三级中文字| 精品国产伦一区二区三区观看方式| 精品久久久久久久久久久久久久久久久 | 日韩中文字幕一区二区三区| 久久精品国产免费看久久精品| 国产麻豆一精品一av一免费| 成人性生交大片免费看中文 | 7777精品伊人久久久大香线蕉完整版 | 国产精品视频看| 午夜天堂影视香蕉久久| 懂色中文一区二区在线播放| 欧美日韩久久久久久| 欧美国产激情二区三区| 日韩精品电影在线| 91在线观看美女| 久久在线免费观看| 日本欧美在线观看| 91视视频在线观看入口直接观看www | 久久精品久久精品| 99国产精品一区| 欧美日高清视频| 国产精品美女久久久久aⅴ| 偷偷要91色婷婷| 成人免费视频app| 精品日韩一区二区三区免费视频| 国产精品不卡一区二区三区| 日韩电影免费在线看| 成人综合激情网| 精品美女在线观看| 一区二区三区国产精品| 国产主播一区二区三区| 精品日本一线二线三线不卡| 亚洲精品综合在线| 波多野结衣中文一区| 久久午夜色播影院免费高清| 日韩福利电影在线| 色欧美乱欧美15图片| 亚洲精品福利视频网站| 91丝袜高跟美女视频| 国产精品午夜春色av| 国产91精品欧美| 日本一区二区免费在线观看视频 | 欧美tickle裸体挠脚心vk| 亚洲欧美视频一区| 亚洲国产精品成人综合| 亚洲乱码国产乱码精品精可以看| 国产成人在线色| 久久久亚洲高清| 国产一区二区三区在线观看免费| 国产一区二区免费在线| 在线观看www91| 亚洲国产精品欧美一二99| av电影在线观看一区| 自拍偷拍欧美精品| 日本电影欧美片| 亚洲午夜一区二区三区| 欧美视频你懂的| 日韩黄色免费电影| 精品入口麻豆88视频| 国产成人亚洲综合a∨婷婷| 亚洲人成网站精品片在线观看| 91蝌蚪国产九色| 青青草精品视频| 国产精品三级久久久久三级| 97久久精品人人做人人爽| 丰满少妇在线播放bd日韩电影| 亚洲欧洲日产国产综合网| 99re8在线精品视频免费播放| 亚洲丝袜自拍清纯另类|