Skip to content

How to query multi-dimensional array of float64 ? #960

@b3j0f

Description

@b3j0f

According to this query:

db.Query("SELECT data FROM chunk", array)

where data is type double precision[][]

I tried with those types without success:

var (
    data [][]sql.NullFloat64
    array = pq.Array(pq.GenericArray{A: &data})
)

error: sql: Scan error on column index 1, name "data": unsupported Scan, storing driver.Value type []uint8 into type *interface { Scan(interface {}) error; Value() (driver.Value, error) }

var (
    data [][]sql.NullFloat64
    array = pq.GenericArray{A: &data}
)

error: sql: Scan error on column index 1, name "data": pq: scanning from multidimensional ARRAY[54614][12] is not implemented

...

Do you have any advice ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions