psgl
/*
Navicat Premium Data Transfer
Source Server : postgreSQL
Source Server Type : PostgreSQL
Source Server Version : 90426
Source Host : localhost:5432
Source Catalog : test
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 90426
File Encoding : 65001
Date: 08/08/2021 23:28:38
*/
-- ----------------------------
-- Table structure for pg_stat_activity
-- ----------------------------
DROP TABLE IF EXISTS "public"."pg_stat_activity";
CREATE TABLE "public"."pg_stat_activity" (
"datid" int4 NOT NULL DEFAULT NULL,
"datname" varchar(255) COLLATE "pg_catalog"."default" DEFAULT NULL,
"pid" int4 DEFAULT NULL,
"sess_id" int4 DEFAULT NULL,
"usesysid" int4 DEFAULT NULL,
"usename" varchar(255) COLLATE "pg_catalog"."default" DEFAULT NULL,
"application_name" text COLLATE "pg_catalog"."default" DEFAULT NULL,
"client_addr" inet DEFAULT NULL,
"client_hostname" text COLLATE "pg_catalog"."default" DEFAULT NULL,
"client_port" int4 DEFAULT NULL,
"backend_start" timestamptz(6) DEFAULT NULL,
"xact_start" timestamptz(6) DEFAULT NULL,
"query_start" timestamptz(6) DEFAULT NULL,
"state_change" timestamptz(6) DEFAULT NULL,
"waiting" bool DEFAULT NULL,
"state" text COLLATE "pg_catalog"."default" DEFAULT NULL,
"backend_xid" int4 DEFAULT NULL,
"backend_xmin" int4 DEFAULT NULL,
"query" text COLLATE "pg_catalog"."default" DEFAULT NULL,
"waiting_reson" text COLLATE "pg_catalog"."default" DEFAULT NULL,
"rsgid" int4 DEFAULT NULL,
"rsgname" text COLLATE "pg_catalog"."default" DEFAULT NULL,
"rsgqueueduration" interval(6) DEFAULT NULL
)
;
-- ----------------------------
-- Primary Key structure for table pg_stat_activity
-- ----------------------------
ALTER TABLE "public"."pg_stat_activity" ADD CONSTRAINT "pg_stat_activity_pkey" PRIMARY KEY ("datid");