summaryrefslogtreecommitdiff
path: root/debian/patches/17_add_postgresql_8.3_support.diff
blob: 889ad508efc47bf4dbc1bb34bcf73a8edd8a9c06 (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
Enable PostgreSQL 8.3 support.

--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -632,9 +632,12 @@ static QPSQLDriver::Protocol getPSQLVers
                     serverVersion = QPSQLDriver::Version81;
                     break;
                 case 2:
-                default:
                     serverVersion = QPSQLDriver::Version82;
                     break;
+                case 3:
+                default:
+                    serverVersion = QPSQLDriver::Version83;
+                    break;
                 }
                 break;
             default:
@@ -915,6 +918,7 @@ QSqlIndex QPSQLDriver::primaryIndex(cons
     case QPSQLDriver::Version8:
     case QPSQLDriver::Version81:
     case QPSQLDriver::Version82:
+    case QPSQLDriver::Version83:
         stmt = QLatin1String("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
                 "pg_class.relname "
                 "FROM pg_attribute, pg_class "
@@ -988,6 +992,7 @@ QSqlRecord QPSQLDriver::record(const QSt
     case QPSQLDriver::Version8:
     case QPSQLDriver::Version81:
     case QPSQLDriver::Version82:
+    case QPSQLDriver::Version83:
         stmt = QLatin1String("select pg_attribute.attname, pg_attribute.atttypid::int, "
                 "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
                 "pg_attrdef.adsrc "
--- a/src/sql/drivers/psql/qsql_psql.h
+++ b/src/sql/drivers/psql/qsql_psql.h
@@ -99,7 +99,8 @@ public:
         Version74 = 10,
         Version8 = 11,
         Version81 = 12,
-        Version82 = 13
+        Version82 = 13,
+        Version83 = 14
     };
 
     explicit QPSQLDriver(QObject *parent=0);