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
2820
March 24, 2012 09:31AM
1101
March 26, 2012 10:38AM
1099
March 26, 2012 04:50PM
896
March 26, 2012 12:26PM
1074
March 26, 2012 04:51PM
1075
March 26, 2012 06:55PM
1001
March 31, 2012 05:04AM
1158
April 01, 2012 09:15AM
1080
April 01, 2012 12:11PM
1082
April 03, 2012 09:45AM
1117
April 04, 2012 11:05AM
Re: Create New Data Type
1242
May 14, 2012 12:21PM
1861
May 14, 2012 12:53PM
1153
March 26, 2012 01:32AM
1170
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.