codecamp

PostgreSQL SPI_keepplan

SPI_keepplan — 保存一个预备语句

大纲

int SPI_keepplan(SPIPlanPtr plan)

描述

SPI_keepplan保存一个被传入的语句(由 SPI_prepare准备好),这样它将不会被 SPI_finish或者事务管理器释放。这让你能够 在当前会话的后续C函数调用中重用预备语句。

参数

SPIPlanPtr plan

要保存的预备语句

返回值

成功返回 0;如果planNULL 或者无效则返回SPI_ERROR_ARGUMENT

注解

这个函数通过指针调整的方法(不需要数据复制)将被传入的语句重定位 到永久存储中。如果你后来需要删除它,可以对它使用 SPI_freeplan

PostgreSQL SPI_cursor_close
PostgreSQL SPI_saveplan
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

PostgreSQL SQL语言

PostgreSQL 服务器管理

PostgreSQL 客户端接口

PostgreSQL 服务器编程

PostgreSQL 参考

PostgreSQL 内部

PostgreSQL 附录

PostgreSQL 参考书目

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }