Get the current free disk space in PostgreSQL PostgreSQL获取磁盘空间 from eshizhan Here has a simple way to get free disk space without any extended language, just define a function using pgsql. CREATE OR REPLACE FUNCTION sys_df() RETURNS SETOF text[] LANG…
postgresql数据库创建/修改/删除等写入类代码语法总结: 1,创建库 2,创建/删除表 2.1 创建表 create table myTableName 2.2 如果表不存在则创建表 create table if not exists myTableName 2.3 删除表 drop table if exists myTableName; 2.4 实例代码: drop table if exists myTableName; create table if not exists my…
1.创建一个函数function1 -- FUNCTION: public.function1(character varying, integer) -- DROP FUNCTION public.function1(character varying, integer); CREATE OR REPLACE FUNCTION public.function1( useridl character varying, groupidl integer) RETURNS TABLE(vehicle…
1.准备好创建函数的脚本 -- FUNCTION: public.dynamic_placelist_select(integer, timestamp without time zone) -- DROP FUNCTION public.dynamic_placelist_select(integer, timestamp without time zone); CREATE OR REPLACE FUNCTION public.dynamic_placelist_select( eigyou…