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
2731
March 24, 2012 09:31AM
1062
March 26, 2012 10:38AM
1063
March 26, 2012 04:50PM
851
March 26, 2012 12:26PM
1029
March 26, 2012 04:51PM
1034
March 26, 2012 06:55PM
954
March 31, 2012 05:04AM
1115
April 01, 2012 09:15AM
1032
April 01, 2012 12:11PM
1041
April 03, 2012 09:45AM
1077
April 04, 2012 11:05AM
Re: Create New Data Type
1187
May 14, 2012 12:21PM
1816
May 14, 2012 12:53PM
1105
March 26, 2012 01:32AM
1129
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.