Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of ​ Rules in PostgreSQL

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

< 0) { /* * didn't find a qualifying character, so remove * all trailing [+-] */ do { nchars--; } while (nchars >

1 & & (yytext [nchars-1] = ='+'| | yytext [nchars-1] = ='-'));}} SET_YYLLOC (); if (nchars

< yyleng) { /* Strip the unwanted chars from the token */ yyless(nchars); /* * If what we have left is only one char, and it's * one of the characters matching "self", then * return it as a character token the same way * that the "self" rule would have. */ if (nchars == 1 && strchr(",()[].;:+-*/%^=", yytext[0])) return yytext[0]; /* * Likewise, if what we have left is two chars, and * those match the tokens ">

= ",", "or *"! = " Then we must return the appropriate token * rather than the generic Op. * / if (nchars = = 2) {if (yytext [0] = ='='& & yytext [1] = ='>') return EQUALS_GREATER If (yytext [0] = ='>'& & yytext [1] = ='=') return GREATER_EQUALS; if (yytext [0] = = 'str = pstrdup (yytext); return FCONST } {realfail2} {/ * throw back the [Ee] [+ -], and proceed as above * / yyless (yyleng-2); SET_YYLLOC (); yylval- > str = pstrdup (yytext); return FCONST } {identifier} {/ /-Identifier const ScanKeyword * keyword; char * ident; SET_YYLLOC (); / * Is it a keyword? * / / is it a keyword? Keyword = ScanKeywordLookup (yytext, yyextra- > keywords, yyextra- > num_keywords) If (keyword! = NULL) {/ / Yes, the key value yylval- > keyword = keyword- > name; return keyword- > value;} / * * No is returned. Convert the identifier to lower case, and truncate * if necessary. * / / if it is not a keyword, set it to lowercase and truncate ident = downcase_truncate_identifier (yytext, yyleng, true) if necessary; yylval- > str = ident; return IDENT;} {other} {SET_YYLLOC () Return yytext [0];} {SET_YYLLOC (); yyterminate ();}% "what's the purpose of Rules in PostgreSQL"? thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report