Skip JSON/JSONB tests for older PostgreSQL servers

pull/89/head
Jack Christensen 2015-09-04 09:13:15 -05:00
parent 0013733535
commit 7383e240d4
1 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,10 @@ func TestJsonTranscode(t *testing.T) {
conn := mustConnect(t, *defaultConnConfig)
defer closeConn(t, conn)
if _, ok := conn.PgTypes[pgx.JsonOid]; !ok {
return // No JSON type -- must be running against old PostgreSQL
}
m := map[string]string{
"key": "value",
}
@ -91,6 +95,10 @@ func TestJsonbTranscode(t *testing.T) {
conn := mustConnect(t, *defaultConnConfig)
defer closeConn(t, conn)
if _, ok := conn.PgTypes[pgx.JsonbOid]; !ok {
return // No JSONB type -- must be running against old PostgreSQL
}
m := map[string]string{
"key": "value",
}