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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tab-complete.c

?? PostgreSQL 8.1.4的源碼 適用于Linux下的開源數據庫系統
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * psql - the PostgreSQL interactive terminal * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.138.2.1 2005/11/14 17:46:07 momjian Exp $ *//*---------------------------------------------------------------------- * This file implements a somewhat more sophisticated readline "TAB * completion" in psql. It is not intended to be AI, to replace * learning SQL, or to relieve you from thinking about what you're * doing. Also it does not always give you all the syntactically legal * completions, only those that are the most common or the ones that * the programmer felt most like implementing. * * CAVEAT: Tab completion causes queries to be sent to the backend. * The number of tuples returned gets limited, in most default * installations to 1000, but if you still don't like this prospect, * you can turn off tab completion in your ~/.inputrc (or else * ${INPUTRC}) file so: * *	 $if psql *	 set disable-completion on *	 $endif * * See `man 3 readline' or `info readline' for the full details. Also, * hence the * * BUGS: * * - If you split your queries across lines, this whole thing gets *	 confused. (To fix this, one would have to read psql's query *	 buffer rather than readline's line buffer, which would require *	 some major revisions of things.) * * - Table or attribute names with spaces in it may confuse it. * * - Quotes, parenthesis, and other funny characters are not handled *	 all that gracefully. *---------------------------------------------------------------------- */#include "postgres_fe.h"#include "tab-complete.h"#include "input.h"/* If we don't have this, we might as well forget about the whole thing: */#ifdef USE_READLINE#include <ctype.h>#include "libpq-fe.h"#include "pqexpbuffer.h"#include "common.h"#include "settings.h"#ifdef HAVE_RL_FILENAME_COMPLETION_FUNCTION#define filename_completion_function rl_filename_completion_function#else/* missing in some header files */extern char *filename_completion_function();#endif#ifdef HAVE_RL_COMPLETION_MATCHES#define completion_matches rl_completion_matches#endif/* * This struct is used to define "schema queries", which are custom-built * to obtain possibly-schema-qualified names of database objects.  There is * enough similarity in the structure that we don't want to repeat it each * time.  So we put the components of each query into this struct and * assemble them with the common boilerplate in _complete_from_query(). */typedef struct SchemaQuery{	/*	 * Name of catalog or catalogs to be queried, with alias, eg.	 * "pg_catalog.pg_class c".  Note that "pg_namespace n" will be added.	 */	const char *catname;	/*	 * Selection condition --- only rows meeting this condition are candidates	 * to display.	If catname mentions multiple tables, include the necessary	 * join condition here.  For example, "c.relkind = 'r'". Write NULL (not	 * an empty string) if not needed.	 */	const char *selcondition;	/*	 * Visibility condition --- which rows are visible without schema	 * qualification?  For example, "pg_catalog.pg_table_is_visible(c.oid)".	 */	const char *viscondition;	/*	 * Namespace --- name of field to join to pg_namespace.oid. For example,	 * "c.relnamespace".	 */	const char *namespace;	/*	 * Result --- the appropriately-quoted name to return, in the case of an	 * unqualified name.  For example, "pg_catalog.quote_ident(c.relname)".	 */	const char *result;	/*	 * In some cases a different result must be used for qualified names.	 * Enter that here, or write NULL if result can be used.	 */	const char *qualresult;} SchemaQuery;/* Store maximum number of records we want from database queries * (implemented via SELECT ... LIMIT xx). */static int	completion_max_records;/* * Communication variables set by COMPLETE_WITH_FOO macros and then used by * the completion callback functions.  Ugly but there is no better way. */static const char *completion_charp;	/* to pass a string */static const char *const * completion_charpp;	/* to pass a list of strings */static const char *completion_info_charp;		/* to pass a second string */static const SchemaQuery *completion_squery;	/* to pass a SchemaQuery *//* A couple of macros to ease typing. You can use these to complete the given   string with   1) The results from a query you pass it. (Perhaps one of those below?)   2) The results from a schema query you pass it.   3) The items from a null-pointer-terminated list.   4) A string constant   5) The list of attributes to the given table.*/#define COMPLETE_WITH_QUERY(query) \do { completion_charp = query; matches = completion_matches(text, complete_from_query); } while(0)#define COMPLETE_WITH_SCHEMA_QUERY(query,addon) \do { completion_squery = &(query); completion_charp = addon; matches = completion_matches(text, complete_from_schema_query); } while(0)#define COMPLETE_WITH_LIST(list) \do { completion_charpp = list; matches = completion_matches(text, complete_from_list); } while(0)#define COMPLETE_WITH_CONST(string) \do { completion_charp = string; matches = completion_matches(text, complete_from_const); } while(0)#define COMPLETE_WITH_ATTR(table) \do {completion_charp = Query_for_list_of_attributes; completion_info_charp = table; matches = completion_matches(text, complete_from_query); } while(0)/* * Assembly instructions for schema queries */static const SchemaQuery Query_for_list_of_aggregates = {	/* catname */	"pg_catalog.pg_proc p",	/* selcondition */	"p.proisagg",	/* viscondition */	"pg_catalog.pg_function_is_visible(p.oid)",	/* namespace */	"p.pronamespace",	/* result */	"pg_catalog.quote_ident(p.proname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_datatypes = {	/* catname */	"pg_catalog.pg_type t",	/* selcondition --- ignore table rowtypes and array types */	"(t.typrelid = 0 "	" OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = t.typrelid)) "	"AND t.typname !~ '^_'",	/* viscondition */	"pg_catalog.pg_type_is_visible(t.oid)",	/* namespace */	"t.typnamespace",	/* result */	"pg_catalog.format_type(t.oid, NULL)",	/* qualresult */	"pg_catalog.quote_ident(t.typname)"};static const SchemaQuery Query_for_list_of_domains = {	/* catname */	"pg_catalog.pg_type t",	/* selcondition */	"t.typtype = 'd'",	/* viscondition */	"pg_catalog.pg_type_is_visible(t.oid)",	/* namespace */	"t.typnamespace",	/* result */	"pg_catalog.quote_ident(t.typname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_functions = {	/* catname */	"pg_catalog.pg_proc p",	/* selcondition */	NULL,	/* viscondition */	"pg_catalog.pg_function_is_visible(p.oid)",	/* namespace */	"p.pronamespace",	/* result */	"pg_catalog.quote_ident(p.proname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_indexes = {	/* catname */	"pg_catalog.pg_class c",	/* selcondition */	"c.relkind IN ('i')",	/* viscondition */	"pg_catalog.pg_table_is_visible(c.oid)",	/* namespace */	"c.relnamespace",	/* result */	"pg_catalog.quote_ident(c.relname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_sequences = {	/* catname */	"pg_catalog.pg_class c",	/* selcondition */	"c.relkind IN ('S')",	/* viscondition */	"pg_catalog.pg_table_is_visible(c.oid)",	/* namespace */	"c.relnamespace",	/* result */	"pg_catalog.quote_ident(c.relname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_tables = {	/* catname */	"pg_catalog.pg_class c",	/* selcondition */	"c.relkind IN ('r')",	/* viscondition */	"pg_catalog.pg_table_is_visible(c.oid)",	/* namespace */	"c.relnamespace",	/* result */	"pg_catalog.quote_ident(c.relname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_tisv = {	/* catname */	"pg_catalog.pg_class c",	/* selcondition */	"c.relkind IN ('r', 'i', 'S', 'v')",	/* viscondition */	"pg_catalog.pg_table_is_visible(c.oid)",	/* namespace */	"c.relnamespace",	/* result */	"pg_catalog.quote_ident(c.relname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_tsv = {	/* catname */	"pg_catalog.pg_class c",	/* selcondition */	"c.relkind IN ('r', 'S', 'v')",	/* viscondition */	"pg_catalog.pg_table_is_visible(c.oid)",	/* namespace */	"c.relnamespace",	/* result */	"pg_catalog.quote_ident(c.relname)",	/* qualresult */	NULL};static const SchemaQuery Query_for_list_of_views = {	/* catname */	"pg_catalog.pg_class c",	/* selcondition */	"c.relkind IN ('v')",	/* viscondition */	"pg_catalog.pg_table_is_visible(c.oid)",	/* namespace */	"c.relnamespace",	/* result */	"pg_catalog.quote_ident(c.relname)",	/* qualresult */	NULL};/* * Queries to get lists of names of various kinds of things, possibly * restricted to names matching a partially entered name.  In these queries, * %s will be replaced by the text entered so far (suitably escaped to * become a SQL literal string).  %d will be replaced by the length of the * string (in unescaped form).	A second %s, if present, will be replaced * by a suitably-escaped version of the string provided in * completion_info_charp. * * Beware that the allowed sequences of %s and %d are determined by * _complete_from_query(). */#define Query_for_list_of_attributes \"SELECT pg_catalog.quote_ident(attname) "\"  FROM pg_catalog.pg_attribute a, pg_catalog.pg_class c "\" WHERE c.oid = a.attrelid "\"   AND a.attnum > 0 "\"   AND NOT a.attisdropped "\"   AND substring(pg_catalog.quote_ident(attname),1,%d)='%s' "\"   AND pg_catalog.quote_ident(relname)='%s' "\"   AND pg_catalog.pg_table_is_visible(c.oid)"#define Query_for_list_of_databases \"SELECT pg_catalog.quote_ident(datname) FROM pg_catalog.pg_database "\" WHERE substring(pg_catalog.quote_ident(datname),1,%d)='%s'"#define Query_for_list_of_tablespaces \"SELECT pg_catalog.quote_ident(spcname) FROM pg_catalog.pg_tablespace "\" WHERE substring(pg_catalog.quote_ident(spcname),1,%d)='%s'"#define Query_for_list_of_encodings \" SELECT DISTINCT pg_catalog.pg_encoding_to_char(conforencoding) "\"   FROM pg_catalog.pg_conversion "\"  WHERE substring(pg_catalog.pg_encoding_to_char(conforencoding),1,%d)=UPPER('%s')"#define Query_for_list_of_languages \"SELECT pg_catalog.quote_ident(lanname) "\"  FROM pg_language "\" WHERE lanname != 'internal' "\"   AND substring(pg_catalog.quote_ident(lanname),1,%d)='%s' "#define Query_for_list_of_schemas \"SELECT pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace "\" WHERE substring(pg_catalog.quote_ident(nspname),1,%d)='%s'"#define Query_for_list_of_set_vars \"SELECT name FROM "\" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\"  WHERE context IN ('user', 'superuser') "\"  UNION ALL SELECT 'constraints' "\"  UNION ALL SELECT 'transaction' "\"  UNION ALL SELECT 'session' "\"  UNION ALL SELECT 'role' "\"  UNION ALL SELECT 'all') ss "\" WHERE substring(name,1,%d)='%s'"#define Query_for_list_of_show_vars \"SELECT name FROM "\" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\"  UNION ALL SELECT 'session authorization' "\"  UNION ALL SELECT 'all') ss "\" WHERE substring(name,1,%d)='%s'"#define Query_for_list_of_system_relations \"SELECT pg_catalog.quote_ident(relname) "\"  FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "\" WHERE c.relkind IN ('r', 'v', 's', 'S') "\"   AND substring(pg_catalog.quote_ident(relname),1,%d)='%s' "\"   AND c.relnamespace = n.oid "\"   AND n.nspname = 'pg_catalog'"#define Query_for_list_of_roles \" SELECT pg_catalog.quote_ident(rolname) "\"   FROM pg_catalog.pg_roles "\"  WHERE substring(pg_catalog.quote_ident(rolname),1,%d)='%s'"#define Query_for_list_of_grant_roles \" SELECT pg_catalog.quote_ident(rolname) "\"   FROM pg_catalog.pg_roles "\"  WHERE substring(pg_catalog.quote_ident(rolname),1,%d)='%s'"\

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩女优av电影| 国产老肥熟一区二区三区| 亚洲免费观看高清| 亚洲免费av网站| 亚洲综合视频在线| 人人精品人人爱| 经典一区二区三区| 懂色av一区二区三区免费观看 | 欧美三级资源在线| 国产在线视频一区二区| 99国产精品国产精品久久| 欧美性猛片aaaaaaa做受| 91精选在线观看| xf在线a精品一区二区视频网站| 国产性色一区二区| 亚洲欧美偷拍三级| 美女免费视频一区二区| 国产精品一区二区视频| 99久久久国产精品免费蜜臀| 欧美性videosxxxxx| 欧美电影免费观看完整版| 国产精品午夜在线| 日韩中文欧美在线| 久久久国产精品麻豆| 国产精品欧美久久久久无广告 | 色综合久久天天| 欧美人妇做爰xxxⅹ性高电影| 亚洲欧洲日产国码二区| 天堂久久一区二区三区| 国产传媒久久文化传媒| 欧美丰满少妇xxxxx高潮对白| 欧美成人a视频| 国产精品丝袜黑色高跟| 亚洲乱码精品一二三四区日韩在线| 蜜桃久久久久久| av在线不卡免费看| 91精品综合久久久久久| 国产精品久久久久久一区二区三区 | 国产精品久久久久婷婷二区次| 亚洲国产你懂的| 国产老肥熟一区二区三区| 欧美精选一区二区| 国产精品久久久久三级| 美女mm1313爽爽久久久蜜臀| 不卡av免费在线观看| 欧美专区亚洲专区| 亚洲三级在线观看| 精品在线一区二区三区| 在线日韩av片| 精品欧美一区二区久久| 亚洲成人动漫在线免费观看| 国产伦精品一区二区三区免费迷| 91蝌蚪porny| 日韩免费高清视频| 亚洲精品国产一区二区三区四区在线| 国产乱码一区二区三区| 欧美日韩国产区一| 国产精品卡一卡二| 九九九精品视频| 3d动漫精品啪啪| 亚洲欧美日韩中文播放 | 国产欧美一区二区三区网站| 日韩中文字幕91| 色av一区二区| 久久先锋资源网| 激情五月激情综合网| 欧美区在线观看| 亚洲欧洲国产日韩| 久久99九九99精品| 777久久久精品| 亚洲成年人影院| 色八戒一区二区三区| 亚洲色欲色欲www| 成人精品免费看| 肉肉av福利一精品导航| 欧美四级电影网| 一区二区理论电影在线观看| caoporm超碰国产精品| 久久久久久久久久久黄色| 美女性感视频久久| 日韩一卡二卡三卡四卡| 日本免费新一区视频| 欧美日韩免费一区二区三区视频| 亚洲黄色片在线观看| 99免费精品在线观看| 欧美精彩视频一区二区三区| 国产一区二区成人久久免费影院 | 日韩欧美一级二级| 亚洲国产精品一区二区尤物区| 91亚洲国产成人精品一区二三| 久久综合五月天婷婷伊人| 国产精品综合网| 国产清纯美女被跳蛋高潮一区二区久久w| 精品一区二区三区的国产在线播放| 欧美一区二区三区人| 一区二区三区波多野结衣在线观看| 91麻豆精品国产综合久久久久久| 蜜臀91精品一区二区三区 | 欧美色图一区二区三区| 99久久精品费精品国产一区二区| 国产精品12区| 风间由美一区二区三区在线观看 | 欧美美女激情18p| 欧美男生操女生| 日韩视频在线观看一区二区| 日韩无一区二区| 日韩欧美在线一区二区三区| 欧美xxxx在线观看| 中文字幕高清一区| 亚洲色图制服丝袜| 亚洲一区自拍偷拍| 日韩成人免费看| 国产精品一二一区| 欧美日韩成人在线一区| 欧美一区二区三区人| 久久一日本道色综合| 国产精品蜜臀在线观看| 亚洲一二三四区| 久久er99精品| 成人高清免费观看| 精品视频123区在线观看| 日韩欧美国产精品| 亚洲精品五月天| 精一区二区三区| 欧美亚州韩日在线看免费版国语版| 宅男噜噜噜66一区二区66| 久久亚洲精华国产精华液| 日韩精品亚洲一区二区三区免费| 亚洲三级在线免费| 成人久久18免费网站麻豆| 国产人成亚洲第一网站在线播放| 精品一区二区三区免费观看 | 久久色在线视频| 精品一区二区三区视频在线观看| 在线播放91灌醉迷j高跟美女| 亚洲高清免费视频| 欧美三电影在线| 婷婷国产v国产偷v亚洲高清| 欧美麻豆精品久久久久久| 天堂va蜜桃一区二区三区| 在线成人av网站| 久久综合综合久久综合| 欧美探花视频资源| 婷婷国产在线综合| 在线观看国产91| 国产精品色呦呦| 成人免费视频国产在线观看| 久久精品一区二区三区四区| 美国欧美日韩国产在线播放| 欧美久久婷婷综合色| 亚洲不卡一区二区三区| 欧美午夜片在线看| 成人免费在线观看入口| 91小宝寻花一区二区三区| 国产欧美综合色| 91麻豆国产香蕉久久精品| 亚洲视频每日更新| 色综合久久久网| 亚洲一区免费视频| 欧美军同video69gay| 日韩av一二三| 久久嫩草精品久久久久| 不卡的电影网站| 亚洲一区二区三区四区在线| 欧美日本在线看| 精品写真视频在线观看| 欧美激情综合五月色丁香小说| 高清视频一区二区| 亚洲影视在线播放| 欧美α欧美αv大片| av午夜精品一区二区三区| 一区二区三区精密机械公司| 91精品一区二区三区久久久久久| 久久精品国产免费| 中文字幕日韩精品一区| 欧美色图一区二区三区| 国产精品18久久久久久久久| 亚洲综合色视频| 国产亚洲成年网址在线观看| 国产一区二三区| 久久精品人人做人人爽97| 国产高清在线观看免费不卡| 久久综合色8888| 高清国产一区二区| 久久午夜羞羞影院免费观看| 国内欧美视频一区二区| 国产精品理论片| 91久久精品一区二区二区| 亚洲成人手机在线| 精品sm捆绑视频| 欧美偷拍一区二区| 粗大黑人巨茎大战欧美成人| 奇米一区二区三区av| 亚洲老妇xxxxxx| 国产精品视频一二三区| 精品欧美久久久| 欧美男生操女生| 欧美色综合网站| 欧美无砖专区一中文字| 99国产精品久久久|