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

📄 preproc.y

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 Y
📖 第 1 页 / 共 5 页
字号:
	INTERVAL INTO INVOKER IS ISNULL ISOLATION        JOIN        KEY	LANCOMPILER LANGUAGE LARGE_P LAST_P LEADING LEAST LEFT LEVEL	LIKE LIMIT LISTEN LOAD LOCAL LOCALTIME LOCALTIMESTAMP LOCATION	LOCK_P LOGIN_P	MATCH MAXVALUE MINUTE_P MINVALUE MODE MONTH_P MOVE	NAMES NATIONAL NATURAL NCHAR NEW NEXT NO NOCREATEDB        NOCREATEROLE NOCREATEUSER NOINHERIT NOLOGIN_P NONE NOSUPERUSER	NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF NUMERIC	OBJECT_P OF OFF OFFSET OIDS OLD ON ONLY OPERATOR OPTION OR ORDER        OUT_P OUTER_P OVERLAPS OVERLAY OWNER	PARTIAL PASSWORD PLACING POSITION	PRECISION PRESERVE PREPARE PREPARED PRIMARY	PRIOR PRIVILEGES PROCEDURAL PROCEDURE	QUOTE	READ REAL RECHECK REFERENCES REINDEX RELATIVE_P RELEASE RENAME	REPEATABLE REPLACE RESET RESTART RESTRICT RETURNS REVOKE RIGHT	ROLE ROLLBACK ROW ROWS RULE	SAVEPOINT SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE	SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE	SHOW SIMILAR SIMPLE SMALLINT SOME STABLE START STATEMENT	STATISTICS STDIN STDOUT STORAGE STRICT_P SUBSTRING SUPERUSER_P SYMMETRIC	SYSID SYSTEM_P        TABLE TABLESPACE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP TO TOAST        TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P TRUNCATE TRUSTED TYPE_P	        UNCOMMITTED UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNTIL	UPDATE USER USING        VACUUM VALID VALIDATOR VALUES VARCHAR VARYING VERBOSE VIEW VOLATILE	WHEN WHERE WITH WITHOUT WORK WRITE        YEAR_P        ZONE/* The grammar thinks these are keywords, but they are not in the keywords.c * list and so can never be entered directly.  The filter in parser.c * creates these tokens when required. */%token	UNIONJOIN/* Special token types, not actually keywords - see the "lex" file */%token <str>	IDENT SCONST Op CSTRING CVARIABLE CPP_LINE IP BCONST XCONST%token <ival>	ICONST PARAM%token <dval>	FCONST/* precedence: lowest to highest */%left		UNION EXCEPT%left		INTERSECT%left		OR%left		AND%right		NOT%right		'='%nonassoc	'<' '>'%nonassoc	LIKE ILIKE SIMILAR%nonassoc	ESCAPE%nonassoc	OVERLAPS%nonassoc	BETWEEN%nonassoc	IN_P%left		POSTFIXOP					/* dummy for postfix Op rules */%left		Op OPERATOR				/* multi-character ops and user-defined operators */%nonassoc	NOTNULL%nonassoc	ISNULL%nonassoc	IS NULL_P TRUE_P FALSE_P UNKNOWN%left		'+' '-'%left		'*' '/' '%'%left		'^'/* Unary Operators */%left		AT ZONE%right		UMINUS%left		'[' ']'%left		'(' ')'%left		TYPECAST%left		'.'%left		JOIN UNIONJOIN CROSS LEFT FULL RIGHT INNER_P NATURAL%type  <str>	Iconst Fconst Sconst TransactionStmt CreateStmt RoleId%type  <str>	CreateAsElement OptCreateAs CreateAsList CreateAsStmt%type  <str>	comment_text ConstraintDeferrabilitySpec TableElementList%type  <str>	key_match ColLabel SpecialRuleRelation ColId columnDef%type  <str>	ColConstraint ColConstraintElem drop_type Bconst Iresult%type  <str>	TableConstraint OptTableElementList Xconst opt_transaction %type  <str>	ConstraintElem key_actions ColQualList type_name%type  <str>	target_list target_el update_target_list alias_clause%type  <str>	update_target_el qualified_name database_name alter_using%type  <str>	access_method attr_name index_name name func_name%type  <str>	file_name AexprConst c_expr ConstTypename var_list%type  <str>	a_expr b_expr TruncateStmt CommentStmt OnCommitOption opt_by%type  <str>	opt_indirection expr_list extract_list extract_arg%type  <str>	position_list substr_list substr_from alter_column_default%type  <str>	trim_list in_expr substr_for attrs TableFuncElement%type  <str>	Typename SimpleTypename Numeric opt_float opt_numeric%type  <str>	opt_decimal Character character opt_varying opt_charset%type  <str>	opt_timezone opt_interval table_ref fetch_direction%type  <str>	ConstDatetime AlterDomainStmt AlterSeqStmt alter_rel_cmds%type  <str>	SelectStmt into_clause OptTemp ConstraintAttributeSpec%type  <str>	opt_table opt_all sort_clause sortby_list ConstraintAttr%type  <str>	sortby qualified_name_list name_list ColId_or_Sconst%type  <str>	group_clause having_clause from_clause opt_distinct opt_hold%type  <str>	join_outer where_clause relation_expr sub_type arg_class%type  <str>	opt_column_list insert_rest InsertStmt WithOidsAs param_name%type  <str>	columnList DeleteStmt UpdateStmt DeclareCursorStmt%type  <str>	NotifyStmt columnElem UnlistenStmt TableElement rowdefinition%type  <str>	copy_delimiter ListenStmt CopyStmt copy_file_name opt_binary%type  <str>	FetchStmt from_in CreateOpClassStmt like_including_defaults%type  <str>	ClosePortalStmt DropStmt VacuumStmt AnalyzeStmt opt_verbose%type  <str>	opt_full func_arg OptWithOids opt_freeze alter_table_cmd %type  <str>	analyze_keyword opt_name_list ExplainStmt index_params%type  <str>	index_elem opt_class access_method_clause alter_table_cmds%type  <str>	index_opt_unique IndexStmt func_return ConstInterval%type  <str>	func_args_list func_args opt_with def_arg overlay_placing%type  <str>	def_elem def_list definition DefineStmt select_with_parens%type  <str>	opt_instead event RuleActionList opt_using CreateAssertStmt%type  <str>	RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type%type  <str>	RuleStmt opt_column oper_argtypes NumConst var_name%type  <str>	MathOp RemoveFuncStmt aggr_argtype ECPGunreserved_con%type  <str>	RemoveAggrStmt opt_procedural select_no_parens CreateCastStmt%type  <str>	RemoveOperStmt RenameStmt all_Op opt_trusted opt_lancompiler%type  <str>	VariableSetStmt var_value zone_value VariableShowStmt%type  <str>	VariableResetStmt AlterTableStmt from_list overlay_list%type  <str>	relation_name OptTableSpace LockStmt opt_lock%type  <str>	CreateUserStmt AlterUserStmt CreateSeqStmt OptSeqList%type  <str>	OptSeqElem TriggerForSpec TriggerForOpt TriggerForType%type  <str>	DropTrigStmt TriggerOneEvent TriggerEvents RuleActionStmt%type  <str>	TriggerActionTime CreateTrigStmt DropPLangStmt DropCastStmt%type  <str>	CreatePLangStmt TriggerFuncArgs TriggerFuncArg simple_select%type  <str>	ViewStmt LoadStmt CreatedbStmt createdb_opt_item ExplainableStmt%type  <str>	createdb_opt_list opt_encoding OptInherit opt_equal%type  <str>	privilege_list privilege privilege_target%type  <str>	opt_grant_grant_option cursor_options%type  <str>	transaction_mode_list_or_empty transaction_mode_list%type  <str>	function_with_argtypes_list function_with_argtypes IntConstVar%type  <str>	DropdbStmt ClusterStmt grantee RevokeStmt Bit DropOpClassStmt%type  <str>	GrantStmt privileges PosAllConst constraints_set_list%type  <str>	ConstraintsSetStmt AllConst CreateDomainStmt opt_nowait%type  <str>	case_expr when_clause_list case_default case_arg when_clause%type  <str>	select_clause opt_select_limit select_limit_value opt_recheck%type  <str>	ConstraintTimeSpec AlterDatabaseSetStmt DropAssertStmt%type  <str>	select_offset_value ReindexStmt join_type opt_boolean%type  <str>	join_qual joined_table opclass_item %type  <str>	lock_type array_expr_list%type  <str>	OptConstrFromTable OptTempTableName StringConst array_expr%type  <str>	constraints_set_mode comment_type %type  <str>	CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete%type  <str>	opt_force key_update CreateSchemaStmt PosIntStringConst%type  <str>	IntConst PosIntConst grantee_list func_type opt_or_replace%type  <str>	select_limit CheckPointStmt ECPGColId%type  <str>	OptSchemaName OptSchemaEltList schema_stmt opt_drop_behavior%type  <str>	handler_name any_name_list any_name opt_as insert_column_list%type  <str>	columnref function_name insert_target_el AllConstVar%type  <str>	insert_target_list insert_column_item DropRuleStmt%type  <str>	createfunc_opt_item set_rest var_list_or_default alter_rel_cmd%type  <str>	CreateFunctionStmt createfunc_opt_list func_table%type  <str>	DropUserStmt copy_from copy_opt_list copy_opt_item%type  <str>	opt_oids TableLikeClause key_action opt_definition%type  <str>	cast_context row qual_Op qual_all_Op opt_default%type  <str>	CreateConversionStmt any_operator opclass_item_list%type  <str>	iso_level type_list CharacterWithLength ConstCharacter%type  <str>	CharacterWithoutLength BitWithLength BitWithoutLength%type  <str>	ConstBit GenericType TableFuncElementList opt_analyze%type  <str>	opt_sort_clause subquery_Op transaction_mode_item%type  <str>	ECPGWhenever ECPGConnect connection_target ECPGOpen%type  <str>	indicator ECPGExecute ECPGPrepare ecpg_using ecpg_into %type  <str>	storage_declaration storage_clause opt_initializer c_anything%type  <str>	variable_list variable c_thing c_term ECPGKeywords_vanames%type  <str>	opt_pointer ECPGDisconnect dis_name storage_modifier%type  <str>	execstring server_name ECPGVarDeclaration func_expr%type  <str>	connection_object opt_server opt_port c_stuff c_stuff_item%type  <str>	user_name opt_user char_variable ora_user ident opt_reference%type  <str>	var_type_declarations quoted_ident_stringvar ECPGKeywords_rest%type  <str>	db_prefix server opt_options opt_connection_name c_list%type  <str>	ECPGSetConnection ECPGTypedef c_args ECPGKeywords ECPGCKeywords%type  <str>	enum_type civar civarind ECPGCursorStmt ECPGDeallocate%type  <str>	ECPGFree ECPGDeclare ECPGVar opt_at enum_definition%type  <str>	struct_union_type s_struct_union vt_declarations execute_rest%type  <str>	var_declaration type_declaration single_vt_declaration%type  <str>	ECPGSetAutocommit on_off variable_declarations ECPGDescribe%type  <str>	ECPGAllocateDescr ECPGDeallocateDescr symbol opt_output%type  <str>	ECPGGetDescriptorHeader ECPGColLabel single_var_declaration%type  <str>	reserved_keyword unreserved_keyword ecpg_interval opt_ecpg_using%type  <str>	col_name_keyword func_name_keyword precision opt_scale%type  <str>	ECPGTypeName using_list ECPGColLabelCommon UsingConst%type  <str>	inf_val_list inf_col_list using_descriptor into_descriptor %type  <str>	prepared_name struct_union_type_with_symbol OptConsTableSpace%type  <str>	ECPGunreserved ECPGunreserved_interval cvariable%type  <str>	AlterOwnerStmt OptTableSpaceOwner CreateTableSpaceStmt%type  <str>	DropTableSpaceStmt indirection indirection_el ECPGSetDescriptorHeader%type  <str>	AlterDatabaseStmt CreateRoleStmt OptRoleList AlterRoleStmt AlterRoleSetStmt%type  <str>	DropRoleStmt add_drop opt_validator common_func_opt_item%type  <str>	opt_grant_admin_option AlterFunctionStmt alterfunc_opt_list opt_restrict%type  <str>	AlterObjectSchemaStmt alterdb_opt_list for_locking_clause opt_for_locking_clause%type  <str>	locked_rels_list opt_granted_by RevokeRoleStmt alterdb_opt_item using_clause%type  <str>	GrantRoleStmt opt_asymmetric%type  <struct_union> s_struct_union_symbol%type  <descriptor> ECPGGetDescriptor ECPGSetDescriptor%type  <type_enum> simple_type signed_type unsigned_type%type  <dtype_enum> descriptor_item desc_header_item%type  <type>	var_type %type  <action> action%type  <index>	opt_array_bounds %%prog: statements;statements: /*EMPTY*/		| statements statement		;statement: ecpgstart opt_at stmt ';'	{ connection = NULL; }		| ecpgstart stmt ';'		| ecpgstart ECPGVarDeclaration		{			fprintf(yyout, "%s", $2);                        free($2);			output_line_number();		}		| ECPGDeclaration		| c_thing		{ fprintf(yyout, "%s", $1); free($1); }		| CPP_LINE		{ fprintf(yyout, "%s", $1); free($1); }		| '{'			{ braces_open++; fputs("{", yyout); }		| '}'			{ remove_typedefs(braces_open); remove_variables(braces_open--); fputs("}", yyout); }		;opt_at: AT connection_target		{			connection = $2;			/*			 *	Do we have a variable as connection target?			 *	Remove the variable from the variable			 *	list or else it will be used twice			 */			if (argsinsert != NULL)				argsinsert = NULL;		};stmt:  AlterDatabaseStmt		{ output_statement($1, 0, connection); }		| AlterDatabaseSetStmt	{ output_statement($1, 0, connection); }		| AlterDomainStmt	{ output_statement($1, 0, connection); }		| AlterFunctionStmt	{ output_statement($1, 0, connection); }		| AlterGroupStmt	{ output_statement($1, 0, connection); }		| AlterObjectSchemaStmt	{ output_statement($1, 0, connection); }		| AlterOwnerStmt	{ output_statement($1, 0, connection); }		| AlterSeqStmt		{ output_statement($1, 0, connection); }		| AlterTableStmt	{ output_statement($1, 0, connection); }		| AlterRoleSetStmt	{ output_statement($1, 0, connection); }		| AlterRoleStmt		{ output_statement($1, 0, connection); }		| AlterUserStmt		{ output_statement($1, 0, connection); }		| AnalyzeStmt		{ output_statement($1, 0, connection); }		| CheckPointStmt	{ output_statement($1, 0, connection); }		| ClosePortalStmt		{			if (INFORMIX_MODE)			{				/* Informix also has a CLOSE DATABASE command that				   essantially works like a DISCONNECT CURRENT 				   as far as I know. */				if (pg_strcasecmp($1+strlen("close "), "database") == 0)				{					if (connection)		                                mmerror(PARSE_ERROR, ET_ERROR, "no at option for close database statement.\n");													fprintf(yyout, "{ ECPGdisconnect(__LINE__, \"CURRENT\");");		                        whenever_action(2);		                        free($1);				}				else					output_statement($1, 0, connection);			}			else				output_statement($1, 0, connection);		}		| ClusterStmt		{ output_statement($1, 0, connection); }		| CommentStmt		{ output_statement($1, 0, connection); }		| ConstraintsSetStmt	{ output_statement($1, 0, connection); }		| CopyStmt		{ output_statement($1, 0, connection); }		| CreateAsStmt		{ output_statement($1, 0, connection); }		| CreateAssertStmt	{ output_statement($1, 0, connection); }		| CreateCastStmt	{ output_statement($1, 0, connection); }		| CreateConversionStmt	{ output_statement($1, 0, connection); }		| CreateDomainStmt	{ output_statement($1, 0, connection); }		| CreateFunctionStmt	{ output_statement($1, 0, connection); }		| CreateGroupStmt	{ output_statement($1, 0, connection); }		| CreatePLangStmt	{ output_statement($1, 0, connection); }		| CreateOpClassStmt	{ output_statement($1, 0, connection); }		| CreateRoleStmt	{ output_statement($1, 0, connection); }		| CreateSchemaStmt	{ output_statement($1, 0, connection); }		| CreateSeqStmt		{ output_statement($1, 0, connection); }		| CreateStmt		{ output_statement($1, 0, connection); }		| CreateTableSpaceStmt	{ output_statement($1, 0, connection); }		| CreateTrigStmt	{ output_statement($1, 0, connection); }		| CreateUserStmt	{ output_statement($1, 0, connection); }		| CreatedbStmt		{ output_statement($1, 0, connection); }		/*| DeallocateStmt	{ output_statement($1, 0, connection); }*/		| DeclareCursorStmt	{ output_simple_statement($1); }		| DefineStmt		{ output_statement($1, 0, connection); }		| DeleteStmt		{ output_statement($1, 1, connection); }		| DropAssertStmt	{ output_statement($1, 0, connection); }		| DropCastStmt		{ output_statement($1, 0, connection); }		| DropGroupStmt		{ output_statement($1, 0, connection); }		| DropOpClassStmt	{ output_statement($1, 0, connection); }		| DropPLangStmt		{ output_statement($1, 0, connection); }		| DropRoleStmt		{ output_statement($1, 0, connection); }		| DropRuleStmt		{ output_statement($1, 0, connection); }		| DropStmt		{ output_statement($1, 0, connection); }		| DropTableSpaceStmt	{ output_statement($1, 0, connection); }		| DropTrigStmt		{ output_statement($1, 0, connection); }		| DropUserStmt		{ output_statement($1, 0, connection); }		| DropdbStmt		{ output_statement($1, 0, connection); }		| ExplainStmt		{ output_statement($1, 0, connection); }/*		| ExecuteStmt		{ output_statement($1, 0, connection); }*/		| FetchStmt		{ output_statement($1, 1, connection); }		| GrantStmt		{ output_statement($1, 0, connection); }		| GrantRoleStmt		{ output_statement($1, 0, connection); }		| IndexStmt		{ output_statement($1, 0, connection); }		| InsertStmt		{ output_statement($1, 1, connection); }		| ListenStmt		{ output_statement($1, 0, connection); }		| LoadStmt		{ output_statement($1, 0, connection); }		| LockStmt		{ output_statement($1, 0, connection); }		| NotifyStmt		{ output_statement($1, 0, connection); }/*		| PrepareStmt		{ output_statement($1, 0, connection); }*/		| ReindexStmt		{ output_statement($1, 0, connection); }		| RemoveAggrStmt	{ output_statement($1, 0, connection); }		| RemoveOperStmt	{ output_statement($1, 0, connection); }		| RemoveFuncStmt	{ output_statement($1, 0, connection); }		| RenameStmt		{ output_statement($1, 0, connection); }		| RevokeStmt		{ output_statement($1, 0, connection); }		| RevokeRoleStmt	{ output_statement($1, 0, connection); }		| RuleStmt		{ output_statement($1, 0, connection); }		| SelectStmt		{ output_statement($1, 1, connection); }		| TransactionStmt		{			fprintf(yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", $1);			whenever_action(2);			free($1);		}		| TruncateStmt		{ output_statement($1, 0, connection); }		| UnlistenStmt		{ output_statement($1, 0, connection); }		| UpdateStmt		{ output_statement($1, 1, connection); }		| VacuumStmt		{ output_statement($1, 0, connection); }		| VariableSetStmt	{ output_statement($1, 0, connection); }		| VariableShowStmt	{ output_statement($1, 0, connection); }		| VariableResetStmt	{ output_statement($1, 0, connection); }		| ViewStmt		{ output_statement($1, 0, connection); }		| ECPGAllocateDescr		{			fprintf(yyout,"ECPGallocate_desc(__LINE__, %s);",$1);			whenever_action(0);			free($1);		}		| ECPGConnect		{			if (connection)				mmerror(PARSE_ERROR, ET_ERROR, "no at option for connect statement.\n");			fprintf(yyout, "{ ECPGconnect(__LINE__, %d, %s, %d); ", compat, $1, autocommit);			reset_variables();			whenever_action(2);			free($1);		}		| ECPGCursorStmt		{			output_simple_statement($1);		}		| ECPGDeallocate

⌨️ 快捷键说明

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