summaryrefslogtreecommitdiff
blob: eebc50ad6da7b496d1667694b62a1a19a9c791df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- qt-everywhere-opensource-src-4.7.1/src/sql/drivers/psql/qsql_psql.cpp	2010-09-10 11:05:25.000000000 +0200
+++ qsql_psql.cpp	2010-11-03 12:37:55.966977333 +0100
@@ -661,6 +661,17 @@
                     break;
                 }
                 break;
+             case 9:
+                switch (vMin) {
+                case 0:
+                    serverVersion = QPSQLDriver::Version9;
+                    break;
+                default:
+                    serverVersion = QPSQLDriver::Version9;
+                    break;
+                }
+                break;
+
             default:
                 break;
             }
@@ -852,7 +863,8 @@
     // This hack can dissapear once there is an API to query this sort of information.
     if (d->pro == QPSQLDriver::Version8 ||
         d->pro == QPSQLDriver::Version81 ||
-        d->pro == QPSQLDriver::Version82) {
+        d->pro == QPSQLDriver::Version82 ||
+        d->pro == QPSQLDriver::Version9)  {
         transaction_failed = qstrcmp(PQcmdStatus(res), "ROLLBACK") == 0;
     }
 
@@ -963,6 +975,7 @@
     case QPSQLDriver::Version8:
     case QPSQLDriver::Version81:
     case QPSQLDriver::Version82:
+    case QPSQLDriver::Version9:
         stmt = QLatin1String("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
                 "pg_class.relname "
                 "FROM pg_attribute, pg_class "
@@ -1046,6 +1059,7 @@
     case QPSQLDriver::Version8:
     case QPSQLDriver::Version81:
     case QPSQLDriver::Version82:
+    case QPSQLDriver::Version9:
         stmt = QLatin1String("select pg_attribute.attname, pg_attribute.atttypid::int, "
                 "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
                 "pg_attrdef.adsrc "
--- qt-everywhere-opensource-src-4.7.1/src/sql/drivers/psql/qsql_psql.h	2010-09-10 11:05:25.000000000 +0200
+++ qsql_psql.h	2010-11-03 12:36:16.380310668 +0100
@@ -104,7 +104,8 @@
         Version74 = 10,
         Version8 = 11,
         Version81 = 12,
-        Version82 = 13
+        Version82 = 13,
+        Version9 = 14
     };
 
     explicit QPSQLDriver(QObject *parent=0);