Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update postgres guide with tested new vers. #384

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Sep 20, 2023

This updates the postgres guide to include the latest versions of postgres which I've now tested and confirmed that they work as intended.

It also modifies the instructions to create a role with login and then create a database with that role as owner as opposed to creating a user that is then granted persmissions to the database.

This approach is generally preferred and all recent versions of postgres (versions >= 8.1) treat 'create user' as an alias for 'create role' with the login permission granted anyway.

As an aside, historically roles were allowed to own database objects while users were not, however, since users are actually just roles nowadays, there is no long a distinction. However, it is still widely considered best practice to use 'create role' when the role will be the owner of a databaes for backward compatibility.

This updates the postgres guide to include the latest versions of
postgres which I've now tested and confirmed that they work as intended.

It also modifies the instructions to create a role with login and then
create a database with that role as owner as opposed to creating a user
that is then granted persmissions to the database.

This approach is generally preferred and all recent versions of postgres
(versions >= 8.1) treat 'create user' as an alias for 'create role' with
the login permission granted anyway.

As an aside, historically roles were allowed to own database objects
while users were not, however, since users are actually just roles
nowadays, there is no long a distinction.  However, it is still widely
considered best practice to use 'create role' when the role will be the
owner of a databaes for backward compatibility.
@jholdstock jholdstock merged commit 491a43e into decred:master Sep 20, 2023
@davecgh davecgh deleted the postgres_config branch September 20, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants