码迷,mamicode.com
首页 > 数据库 > 详细

通过ALTER DATABASE postgres SET 解决 plv8 plv8.start_proc 问题

时间:2019-11-10 13:43:01      阅读:81      评论:0      收藏:0      [点我收藏+]

标签:nta   配置   建立   default   base   variable   href   lin   http   

通过plv8.start_proc 我们可以使用类似钩子的改变 ,方便的扩展plv8,比如基于plv8.start_proc
的require 实现

命令

ALTER DATABASE postgres SET "plv8.start_proc" TO "v8.plv8_init";

说明

默认我们需要在建立连接的时候配置,一般如下:

SET plv8.start_proc = ‘v8.plv8_init‘;

通过ALTER DATABASE postgres SET 我们就为每个session 配置了自动的变量,不需要代码调整了。
同时我们编写sql 也就会很简单了

参考资料

https://www.postgresql.org/docs/9.1/sql-alterdatabase.html

通过ALTER DATABASE postgres SET 解决 plv8 plv8.start_proc 问题

标签:nta   配置   建立   default   base   variable   href   lin   http   

原文地址:https://www.cnblogs.com/rongfengliang/p/11829483.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!