1.准备好命令文件 loraserver.sql create role loraserver_as with login password 'dbpassword'; create role loraserver_ns with login password 'dbpassword'; create database loraserver_as with owner loraserver_as; create database loraserver_ns with owner loraserv…
1 前言 功能需求:当一张表格某个字段变化,另一张表某个字段写入该值 2 代码 CREATE OR REPLACE FUNCTION "public"."synStatus"() RETURNS "pg_catalog"."trigger" AS $BODY$ declare vl_status int; BEGIN SELECT status INTO vl_status FROM ordergoods WHERE orde…