PostgreSQL 命令

su - postgres
psql
\du (查看角色)
\l (列出所有数据库)
\q (退出)\df (查看function)
查看function
SELECT
  pg_proc.proname AS "函数名称",
  pg_type.typname AS "返回值数据类型",
  pg_proc.pronargs AS "参数个数"
FROM
  pg_proc
    JOIN pg_type
   ON (pg_proc.prorettype = pg_type.oid)
WHERE
  pg_type.typname != 'void'
  AND pronamespace = (SELECT pg_namespace.oid FROM pg_namespace WHERE nspname = 'public');


你可能感兴趣的:(PostgreSQL 命令)