09.11.2014 12:20, Mark Rotteveel wrote: > >>> For implementing this I need to add two keywords: ROW and OFFSET (note: >>> defined as reserved in SQL standard), but looking at the definition in >>> keywords.cpp, I wonder what I need to use for version (1 or 2, or maybe >>> a different value. >> >> Version 2. > > Out of curiosity: what does it mean?
The intention was to support different parser versions, so that the older parsers wouldn't treat new keywords as... errr... keywords ;-) // Figure out which parser version to use // Since the API to dsql8_prepare is public and can not be changed, there needs to // be a way to send the parser version to DSQL so that the parser can compare the keyword // version to the parser version. To accomplish this, the parser version is combined with // the client dialect and sent across that way. In dsql8_prepare_statement, the parser version // and client dialect are separated and passed on to their final destinations. The information // is combined as follows: // Dialect * 10 + parser_version // // and is extracted in dsql8_prepare_statement as follows: // parser_version = ((dialect *10)+parser_version)%10 // client_dialect = ((dialect *10)+parser_version)/10 However, after looking there again, I fail to see how it's expected to work, provided that the remote server always passes PARSER_VERSION = 2 to the engine and the embedded access also implies PARSER_VERSION = 2. It could be a good idea to try cleaning this up and removing this crap from the new API. Dmitry ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
