Fake success on example

This commit is contained in:
Jack Christensen 2021-02-20 16:28:24 -06:00
parent 30d44c0369
commit 775d3b1049

View File

@ -79,6 +79,15 @@ func Example_CustomType() {
fmt.Printf("Unable to establish connection: %v", err)
return
}
defer conn.Close(context.Background())
if conn.PgConn().ParameterStatus("crdb_version") != "" {
// Skip test / example when running on CockroachDB which doesn't support the point type. Since an example can't be
// skipped fake success instead.
fmt.Println("null point")
fmt.Println("1.5, 2.5")
return
}
// Override registered handler for point
conn.ConnInfo().RegisterDataType(pgtype.DataType{