Re: Create New Data Type
Posted by: larry williams
Date: May 14, 2012 12:21PM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
2540
March 24, 2012 09:31AM
1006
March 26, 2012 10:38AM
1008
March 26, 2012 04:50PM
801
March 26, 2012 12:26PM
975
March 26, 2012 04:51PM
982
March 26, 2012 06:55PM
904
March 31, 2012 05:04AM
1057
April 01, 2012 09:15AM
976
April 01, 2012 12:11PM
981
April 03, 2012 09:45AM
1019
April 04, 2012 11:05AM
Re: Create New Data Type
1096
May 14, 2012 12:21PM
1750
May 14, 2012 12:53PM
1056
March 26, 2012 01:32AM
1062
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.