postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Inserting raster data?

Open terion-name opened this issue 1 year ago • 0 comments

I am trying to store tile data to table using postgis-raster type for tile data.

const tile_data = Buffer.from(await res.arrayBuffer())
await db`INSERT INTO ${db(sourceSpec.table)} (z, x, y, tile_data) VALUES (${z}, ${x}, ${y}, ${tile_data})`

result in error

column "tile_data" is of type raster but expression is of type bytea

How to insert raster properly with postgres.js?

terion-name avatar Mar 25 '24 16:03 terion-name