sqllogictest
Check-in [b5e970313f]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use standard engine naming for PostgreSQL as the tests already rely on it.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b5e970313f8b158a25a6d2d9f34f18ee64c114f1
User & Date: mistachkin 2014-02-11 07:40:38
Context
2014-02-11
07:54
Skip MSSQL for several tests that are incompatible with it. check-in: bf3dafd972 user: mistachkin tags: trunk
07:40
Use standard engine naming for PostgreSQL as the tests already rely on it. check-in: b5e970313f user: mistachkin tags: trunk
07:21
Enhance support for recent versions of PostgreSQL. check-in: 1694a55bf7 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/slt_odbc3.c.

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
...
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
            && (0 == strcmp(res.azValue[i+3], "TABLE"))
            && (0 == strcmp(res.azValue[i+4], "NULL"))
        ){
          sprintf(zSql, "DROP TABLE %s", res.azValue[i+2]);
          rc = ODBC3Statement(pODBC3conn, zSql, 0);
        }
      }
    }else if( 0 == stricmp(zDmbsName, "pgsql") ){
      for( i=0; !rc && (i+4<res.nUsed); i+=5 ){
        if(    (0 == stricmp(res.azValue[i], zDbName))
            && (0 == strcmp(res.azValue[i+1], "(empty)")
                 || 0 == strcmp(res.azValue[i+1], "NULL")
                 || 0 == stricmp(res.azValue[i+1], "public"))
            && (strlen(res.azValue[i+2])>0)
            && (0 == strcmp(res.azValue[i+3], "TABLE"))
................................................................................
  ret = SQLGetInfo(pODBC3conn->dbc,
                   SQL_DBMS_NAME,
                   zDmbsName,
                   sizeof(zDmbsName),
                   &outLen);
  if( SQL_SUCCEEDED(ret) || (ret == SQL_SUCCESS_WITH_INFO) ){
    /* map Microsoft SQL Server -> mssql */
    /* map PostgreSQL -> pgsql */
    if( stricmp("Microsoft SQL Server", zDmbsName)==0 ){
      *zName = "mssql";
    }else if( stricmp("PostgreSQL", zDmbsName)==0 ){
      *zName = "pgsql";
    }else{
      *zName = zDmbsName;
    }
    return 0;
  }
  return 1;
}







|







 







<


<
<







301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
...
739
740
741
742
743
744
745

746
747


748
749
750
751
752
753
754
            && (0 == strcmp(res.azValue[i+3], "TABLE"))
            && (0 == strcmp(res.azValue[i+4], "NULL"))
        ){
          sprintf(zSql, "DROP TABLE %s", res.azValue[i+2]);
          rc = ODBC3Statement(pODBC3conn, zSql, 0);
        }
      }
    }else if( 0 == stricmp(zDmbsName, "postgresql") ){
      for( i=0; !rc && (i+4<res.nUsed); i+=5 ){
        if(    (0 == stricmp(res.azValue[i], zDbName))
            && (0 == strcmp(res.azValue[i+1], "(empty)")
                 || 0 == strcmp(res.azValue[i+1], "NULL")
                 || 0 == stricmp(res.azValue[i+1], "public"))
            && (strlen(res.azValue[i+2])>0)
            && (0 == strcmp(res.azValue[i+3], "TABLE"))
................................................................................
  ret = SQLGetInfo(pODBC3conn->dbc,
                   SQL_DBMS_NAME,
                   zDmbsName,
                   sizeof(zDmbsName),
                   &outLen);
  if( SQL_SUCCEEDED(ret) || (ret == SQL_SUCCESS_WITH_INFO) ){
    /* map Microsoft SQL Server -> mssql */

    if( stricmp("Microsoft SQL Server", zDmbsName)==0 ){
      *zName = "mssql";


    }else{
      *zName = zDmbsName;
    }
    return 0;
  }
  return 1;
}