1
我正在使用SPI_getbinval
從我的光標中拖出一個類型爲double precision[]
的列。我怎麼能重建這在C中的double *
,所以我可以使用值?Postgresql SPI:操縱類型「Datum」以創建雙數組
我在文檔中看到的大多數示例都引用了隱含幫助函數(即construct_md_array()
),但我找不到這些函數的列表或者如何根據我的情況適當地使用它們。
基本上,我需要知道從Datum
構建double
數組的最有效方法,其中包含double precision[]
。
(參見之前的問題Achieving high-performance transactions when extending PostgreSQL with C-functions)。
這可能很有趣:http://www.postgresql.org/message-id/[email protected]。同時檢查'intarray' contrib模塊。 –