If you receive an error when installing, please see the appendix at the end of this post:

E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch https://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

6- Annexe: Fixer des erreurs

If you receive an error message:

E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch https://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.