用户登录
用户注册

分享至

postgresql 9从零开始

  • 作者: 楓27110021
  • 来源: 51数据库
  • 2020-10-02
设置PostgreSQL 开机自动启动
[root@webpg]# chkconfig postgresql-9.4 on
[root@webpg]# chkconfig --list|grep post
停止PostgreSQL数据库
-bash-3.2$ pg_ctl stop -D /var/lib/pgsql/9.4/data



  错误代码中已经提示了使用perform来替代,说明你的select语句,就必须写到一个变量中。
$$
declare?v_cmd?text;
begin

v_cmd='select?count(*)?from?"user"?where?username=$1?and?password=$2';
perform?exec_shell(v_cmd);按照这个去修改,这样就可以了,同时建立一个exec_shell()的函数。

create?or?replace?function?exec_shell(character?varying)
??returns?integer?as
$body$
???system($_[0]);
???return?1;
$body$
??language?plperlu?volatile
??cost?1;
软件
前端设计
程序设计
Java相关