c - 如何在我自己的 PostgreSQL 扩展中使用内部 PostGIS 函数?

标签 c postgresql postgis

在我自己的 PostgreSQL 扩展中是否有一种稳定且可移植的方式来使用 PostGIS 函数? 我想通过直接从 postgis-$version.so(在 PostgreSQL 的 $libdir 中)调用此函数来使用我的 C 代码中的相交函数来处理几何类型。

最佳答案

您通常应该通过 SPIfmgr 快速路径调用来调用 SQL 级别的 PostGIS 函数来执行此操作。

参见 this related question about using hstore from C .

关于c - 如何在我自己的 PostgreSQL 扩展中使用内部 PostGIS 函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16507196/

相关文章:

c - scanf()将新行char留在缓冲区中

c - Linux内核中的ptrace在哪里?

postgresql - 通过psql将表从本地容器复制到Docker容器

database - GRANT USAGE ON SCHEMA 究竟做了什么?

postgresql - native SQL 查询的默认模式(spring-boot + hibernate + postgresql + postgis)

c - 最快的多类型数组解决方案?

c - 标记字符串后无法打印结果

SQL - 创建 SQL 以加入列表

sql - 优化 postgis 索引查询。注意 : gserialized_gist_joinsel: jointype 1 not supported

postgresql - 使用 docker 创建扩展 postgis 错误。已安装所有库