I'm writing C postgresql module with postgresql functions and want to access the tables from inside (SELECT mostly and maybe INSERT). Is it possible? If yes what API can I use except classic TCP connection (not sure if it's even legal)?
Yan Pas <yanp.bugz@gmail.com> writes:
> I'm writing C postgresql module with postgresql functions and want to
> access the tables from inside (SELECT mostly and maybe INSERT). Is it
> possible? If yes what API can I use except classic TCP connection (not sure
> if it's even legal)?
Recommended way is to use SPI:
https://www.postgresql.org/docs/current/static/spi.html
Aside from that documentation, there are lots of examples to study in the
core code and contrib.
regards, tom lane
Есть вопросы? Напишите нам!
✖
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера