PostgreSQL do language plpgsql $$ ...

来源:互联网 发布:vc连接access数据库 编辑:程序博客网 时间:2024/06/05 14:59

PostgreSQL支持无需创建出来即可执行的function,关键字是

do language plpgsql $$declarebegin......end $$;

示例如下:

postgres=# do language plpgsql $$postgres$# declarepostgres$# beginpostgres$# raise notice 'hello postgresql';postgres$# end $$;NOTICE:  hello postgresqlDO

0 0
原创粉丝点击