Herramientas de usuario

Herramientas del sitio


notas:bases_de_datos:postgresql

PostgreSQL

How to list user accounts

SELECT u.usename AS "User name",
  u.usesysid AS "User ID",
  CASE WHEN u.usesuper AND u.usecreatedb THEN CAST('superuser, create
database' AS pg_catalog.text)
       WHEN u.usesuper THEN CAST('superuser' AS pg_catalog.text)
       WHEN u.usecreatedb THEN CAST('create database' AS
pg_catalog.text)
       ELSE CAST('' AS pg_catalog.text)
  END AS "Attributes"
FROM pg_catalog.pg_user u
ORDER BY 1;
notas/bases_de_datos/postgresql.txt · Última modificación: 2016/08/04 14:48 por cayu