Skip to content

Commit

Permalink
chore: Use current version for postgresql.org links (links are quite …
Browse files Browse the repository at this point in the history
…stable over years)
  • Loading branch information
jpmckinney committed May 25, 2023
1 parent 307aa33 commit 41d726f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/general/preferences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Datastores
----------

- PostgreSQL
- Elasticsearch if our needs exceed PostgreSQL's `capabilities <https://www.postgresql.org/docs/11/textsearch.html>`__, or if there is no PostgreSQL database
- Elasticsearch if our needs exceed PostgreSQL's `capabilities <https://www.postgresql.org/docs/current/textsearch.html>`__, or if there is no PostgreSQL database

Web servers
-----------
Expand Down
2 changes: 1 addition & 1 deletion docs/python/django.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Models

- Use ``from django.db import models``, `as convention <https://docs.djangoproject.com/en/3.2/ref/models/fields/>`__.
- Use ``help_text`` and ``verbose_name`` to describe fields.
- Use ``TextField``, not ``CharField``. There is `no performance difference <https://www.postgresql.org/docs/11/datatype-character.html>`__ in PostgreSQL.
- Use ``TextField``, not ``CharField``. There is `no performance difference <https://www.postgresql.org/docs/current/datatype-character.html>`__ in PostgreSQL.
- Do not use ``null=True`` with ``TextField`` or ``CharField``, `as recommended <https://docs.djangoproject.com/en/3.2/ref/models/fields/#null>`__.
- Do not use ``null=True`` with ``JSONField``, if possible. Instead, use ``default=dict``, ``default=list`` or ``default=""``.
- Use the `pk property <https://docs.djangoproject.com/en/3.2/ref/models/instances/#the-pk-property>`__ and the `pk lookup shortcut <https://docs.djangoproject.com/en/3.2/topics/db/queries/#the-pk-lookup-shortcut>`__ instead of ``id``.
Expand Down
2 changes: 1 addition & 1 deletion docs/services/postgresql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Identify the client

Database administrators need to identify the sources of queries, in order to notify developers of inefficient queries or alert users whose queries will be interrupted by maintenance. For example:

- Django applications set the `application_name <https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME>`__ query string parameter in the PostgreSQL `connection URI <https://www.postgresql.org/docs/11/libpq-connect.html#id-1.7.3.8.3.6>`__, or use a service-specific user
- Django applications set the `application_name <https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME>`__ query string parameter in the PostgreSQL `connection URI <https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6>`__, or use a service-specific user
- Kingfisher Summarize uses the `psycopg2 <https://www.psycopg.org/docs/>`__ package, and adds ``/* kingfisher-summarize {identifier} */`` as a comment to expensive queries
- Kingfisher Colab uses the `ipython-sql <https://pypi.org/project/ipython-sql/>`__ package, and adds the Google Colaboratory notebook URL as a comment to all queries

Expand Down
2 changes: 1 addition & 1 deletion docs/sql/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Do not use ``LIMIT`` with ``OFFSET``. ``OFFSET`` becomes more inefficient as its
Load and dump data
~~~~~~~~~~~~~~~~~~

Use the `\copy <https://www.postgresql.org/docs/13/app-psql.html#APP-PSQL-META-COMMANDS-COPY>`__ meta-command instead of the `COPY <https://www.postgresql.org/docs/13/sql-copy.html>`__ command, so that file accessibility and privileges are those of the user, not the server – such that no SQL superuser privileges are required.
Use the `\copy <https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-META-COMMANDS-COPY>`__ meta-command instead of the `COPY <https://www.postgresql.org/docs/current/sql-copy.html>`__ command, so that file accessibility and privileges are those of the user, not the server – such that no SQL superuser privileges are required.

Code format
-----------
Expand Down

0 comments on commit 41d726f

Please sign in to comment.