Chapter 21. Database Roles lists the default roles of PostgreSQL. But I don't find user
postgresthere, which has been created by default in PostgreSQL. Ispostgresa default role? Does the manual miss it or do I misunderstand?In PostgreSQL, is
postgresa special user, or a regular user just like one created manually? Does the PostgreSQL server need the userpostgres? Will removing it cause some trouble to the server or something else?The following two commands run in psql provide default roles or usernames, which both include
postgres. Why do they differ?# select usename from pg_catalog.pg_user; usename ---------- postgres (1 row) # select rolname from pg_catalog.pg_roles; rolname ---------------------- postgres pg_monitor pg_read_all_settings pg_read_all_stats pg_stat_scan_tables pg_signal_backend (6 rows)# select usename from pg_catalog.pg_user; usename ---------- postgres (1 row) # select rolname from pg_catalog.pg_roles; rolname ---------------------- postgres pg_monitor pg_read_all_settings pg_read_all_stats pg_stat_scan_tables pg_signal_backend (6 rows)
Fixed the weird syntax highlighting (as a result, the diff looks more extensive than it really is - use view "Side-by-side Markdown" to compare).
Peter Mortensen
- 31.2k
- 22
- 111
- 134
Active reading [<https://en.wikipedia.org/wiki/PostgreSQL> <https://en.wiktionary.org/wiki/will#Verb>]. Dressed the naked link. Removed meta information (this belongs in comments).
Peter Mortensen
- 31.2k
- 22
- 111
- 134