Explicitly use UTF-8 when creating the PostgreSQL database #11153

Closed
opened 2025-12-29 21:41:01 +01:00 by adam · 7 comments
Owner

Originally created by @larsen0815 on GitHub (May 9, 2025).

Change Type

Addition

Area

Installation/upgrade

Proposed Changes

See 5d4c12bbf1

Originally created by @larsen0815 on GitHub (May 9, 2025). ### Change Type Addition ### Area Installation/upgrade ### Proposed Changes See https://github.com/netbox-community/netbox/commit/5d4c12bbf17dadfd1044769cbe84ff2aa165c4a1
adam added the type: documentationpending closurestatus: revisions needed labels 2025-12-29 21:41:01 +01:00
adam closed this issue 2025-12-29 21:41:01 +01:00
Author
Owner

@arthanson commented on GitHub (May 9, 2025):

@larsen0815 can you please expand on this, I see the change you referenced but there is really no description or justification in this request - why do you think this should be changed / what is the purpose of this, what are you asking to change - you reference a fork outside the repository which could go away or change in the future, so important to have what the changes requested are laid out here.

@arthanson commented on GitHub (May 9, 2025): @larsen0815 can you please expand on this, I see the change you referenced but there is really no description or justification in this request - why do you think this should be changed / what is the purpose of this, what are you asking to change - you reference a fork outside the repository which could go away or change in the future, so important to have what the changes requested are laid out here.
Author
Owner

@larsen0815 commented on GitHub (May 9, 2025):

Sorry, should have posted that information right away.

I just recently installed NetBox for the first time and the installation instructions state to make sure to use UTF-8 for the database which should be the default. For my server running Debian Bookworm however, this was not the case, and I had to delete the database and create it again, this time explicitly stating WITH TEMPLATE = template0 ENCODING = 'UTF8';

@larsen0815 commented on GitHub (May 9, 2025): Sorry, should have posted that information right away. I just recently installed NetBox for the first time and the installation instructions state to make sure to use UTF-8 for the database which should be the default. For my server running Debian Bookworm however, this was not the case, and I had to delete the database and create it again, this time explicitly stating `WITH TEMPLATE = template0 ENCODING = 'UTF8';`
Author
Owner

@bctiemann commented on GitHub (May 15, 2025):

Probably not the best idea to require WITH TEMPLATE = template0 ENCODING = 'UTF8'; on every database create command as it conveys unnecessary complexity and fragility; but maybe a better plan would be to add a step to simply confirm that the DB was created with UTF-8?

@bctiemann commented on GitHub (May 15, 2025): Probably not the best idea to require `WITH TEMPLATE = template0 ENCODING = 'UTF8';` on every database create command as it conveys unnecessary complexity and fragility; but maybe a better plan would be to add a step to simply confirm that the DB was created with UTF-8?
Author
Owner

@larsen0815 commented on GitHub (May 16, 2025):

Why not create it right the first time instead of potentially creating, checking, deleting, creating again?

@larsen0815 commented on GitHub (May 16, 2025): Why not create it right the first time instead of potentially creating, checking, deleting, creating again?
Author
Owner

@jeremystretch commented on GitHub (May 16, 2025):

Why not create it right the first time instead of potentially creating, checking, deleting, creating again?

Because most systems already create it correctly. Introducing a more complex command solely to address those that don't introduces the risk that something else will go wrong.

Please also bear in mind that the installation instructions for NetBox assume that the administrator generally knows what he or she is doing and can adjust accordingly. The documentation is not intended to cover all possible scenarios.

@jeremystretch commented on GitHub (May 16, 2025): > Why not create it right the first time instead of potentially creating, checking, deleting, creating again? Because most systems already create it correctly. Introducing a more complex command solely to address those that don't introduces the risk that something _else_ will go wrong. Please also bear in mind that the installation instructions for NetBox assume that the administrator generally knows what he or she is doing and can adjust accordingly. The documentation is _not_ intended to cover all possible scenarios.
Author
Owner

@github-actions[bot] commented on GitHub (May 24, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (May 24, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@github-actions[bot] commented on GitHub (May 31, 2025):

This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.

@github-actions[bot] commented on GitHub (May 31, 2025): This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11153