Re: Create New Data Type
In order to create a new data type, you need to be familiar with both the sql_yacc.yy and the lex.h files. Understanding these files, how they are converted into sql_yacc.cc, sql_yacc.h and lex_hash.h is critical, but not the point of this response. Understanding these files and how to use them is the first step. I am starting with 'step 2'.
In sql_yacc:
Add a 'token' for your data type. Notice that the token list is alphabetical. Keep it this way.
%token MYTYPE /* LRW TYPE */
In the '%type <NONE>' section, add the reference for your new data type. I admit that I do not understand this section and its purpose, but I needed include my type here. Notice that there are other 'non-base' data type declarations here too.
ref_list opt_match_clause opt_on_update_delete use
--> mytype opt_delete_options opt_delete_option varchar
nchar nvarchar opt_outer table_list table_name
table_alias_ref_list
Subject
Views
Written By
Posted
2639
March 24, 2012 09:31AM
1034
March 26, 2012 10:38AM
1032
March 26, 2012 04:50PM
827
March 26, 2012 12:26PM
998
March 26, 2012 04:51PM
1007
March 26, 2012 06:55PM
930
March 31, 2012 05:04AM
1089
April 01, 2012 09:15AM
997
April 01, 2012 12:11PM
1005
April 03, 2012 09:45AM
1043
April 04, 2012 11:05AM
Re: Create New Data Type
1141
May 14, 2012 12:21PM
1786
May 14, 2012 12:53PM
1081
March 26, 2012 01:32AM
1095
June 23, 2012 08:18AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.