summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.scm24
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 21daa09..ff4c0d2 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -121,10 +121,6 @@
(exn postgresql bounds)
(table-oid
(query conn "SELECT typname FROM pg_type") 1))
- (test "Table column number for real table"
- 0
- (table-column-index
- (query conn "SELECT typname FROM pg_type") 0))
(test "Column format is text for normal data"
'text
(column-format
@@ -257,6 +253,10 @@
1
(affected-rows
(query conn "INSERT INTO foo (bar) VALUES (1);")))
+ (test "Table column number for real table"
+ 0
+ (table-column-index
+ (query conn "SELECT bar FROM foo") 0))
(query conn "COMMIT")
(query conn "BEGIN")
@@ -282,13 +282,15 @@
(query conn "INSERT INTO foo (bar) VALUES (1);")))
(query conn "COMMIT")
- (query conn "BEGIN")
- (query conn "CREATE TEMP TABLE foo ( bar integer ) WITH (OIDS=true) ON COMMIT DROP")
- (test-assert "Inserted OID number on table with OID"
- (number?
- (inserted-oid
- (query conn "INSERT INTO foo (bar) VALUES (1)"))))
- (query conn "COMMIT")
+ ;; Since Postgres 12, WITH OIDS is not supported anymore
+ (when (< major-version 12)
+ (query conn "BEGIN")
+ (query conn "CREATE TEMP TABLE foo ( bar integer ) WITH (OIDS=true) ON COMMIT DROP")
+ (test-assert "Inserted OID number on table with OID"
+ (number?
+ (inserted-oid
+ (query conn "INSERT INTO foo (bar) VALUES (1)"))))
+ (query conn "COMMIT"))
(test "regular parameters"
"hi"