Re: db-lib: support for new MS SQL 2008 data types
LacaK <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Frediano Ziglio wrote / napísal(a): > 2014-04-03 12:48 GMT+01:00 LacaK <[email protected]>: > >> Hi, >> I start with first, very small, steps to add support for DATE, TIME and >> DATETIME2 data types to db-lib. >> I attach patches for: >> - src/dblib/dblib.c >> - src/tds/token.c >> let me please know if you can accept (and commit) them. >> Then I will try do further steps. >> Thanks >> -Laco. >> >> --- token.c.ori Thu Apr 03 13:32:02 2014 >> +++ token.c Thu Apr 03 11:04:48 2014 >> @@ -3016,6 +3016,7 @@ tds_prtype(int type) >> TYPE(XSYBVARCHAR, "xvarchar"); >> TYPE(SYBMSDATE, "date"); >> TYPE(SYBMSTIME, "time"); >> + TYPE(SYBMSDATETIME2, "datetime2"); >> default: >> break; >> } >> >> --- dblib.c.ori Mon Mar 31 22:34:14 2014 >> +++ dblib.c Thu Apr 03 13:39:42 2014 >> @@ -224,6 +224,9 @@ DBVERSION_71; >> #ifdef TDS72 >> DBVERSION_72; >> #endif >> +#ifdef TDS73 >> +DBVERSION_73; >> +#endif >> >> >> static int >> @@ -942,6 +945,9 @@ dbsetlversion (LOGINREC * login, BYTE ve >> case DBVERSION_72: >> tds_set_version(login->tds_login, 7, 2); >> return SUCCEED; >> + case DBVERSION_73: >> + tds_set_version(login->tds_login, 7, 3); >> + return SUCCEED; >> } >> >> return FAIL; >> @@ -5761,7 +5767,9 @@ dbsetversion(DBINT version) >> case DBVERSION_46: >> case DBVERSION_100: >> case DBVERSION_70: >> - case DBVERSION_80: >> + case DBVERSION_71: >> + case DBVERSION_72: >> + case DBVERSION_73: >> g_dblib_version = version; >> return SUCCEED; >> default: >> >> > > > Looks ok and compile correctly. I actually launched some tests. Can > you add just a comment for the commit. May be: - for db-lib.c: "add support for TDS 7.3 to db-lib dbsetversion() and dbsetlversion() functions" - for token.c: "add data type name for SYBMSDATETIME2 to tds_prtype()" > I'll commit with your name. > Which name/mail address do you want in the commit, Something like > "Name Surname" <yourmail@domain> > You can use my nick-name (already used in commit from past) Lacak <[email protected]> or my full name is: Ladislav Karrach Thanks -Laco.