1
Fork 0

Translate postgresql to fr

This commit is contained in:
Edgar P. Burkhart 2022-08-22 19:18:10 +02:00
parent 11089f0d19
commit 4e07b40c9b
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
1 changed files with 27 additions and 20 deletions

View File

@ -11,47 +11,52 @@ weight: 1
# PostgreSQL
*On this page, `$` means the command must be run as a user with adequate rights such as the `postgres` user.*
*Sur cette page, `$` signifie que la commande doit être executée par un utilisateur avec les permissions requises,
comme exemple l'utilisateur `postgres`.*
## Installation
### Archlinux
On archlinux, PostgreSQL can be installed using the `postgresql` package from `[extra]`.
Sur Archlinux, PostgreSQL est disponible par le paquet `postgresql` dans `[extra]`.
Major PostgreSQL upgrades are breaking. Instructions from the [official documentation](https://www.postgresql.org/docs/current/upgrading.html) should be followed.
Les versions majeures de PostgreSQL sont incompatibles entre elles. Les instructions de la
[documentation officielle][1] doivent être suivies.
Upgrades can be prevented by adding `postgresql` and `postgresql-libs` to `IgnorePkg` in `/etc/pacman.conf`.
Les mises à jour peuvent être évitées en ajoutant `postgresql` et `postgresql-libs` à `IgnorePkg` dans
`pacman.conf`.
## Filesystem preparation
In case a Btrfs filesystem is used, Copy-on-Write should be disabled first.
## Préparation du système de fichiers
## Initial setup
The database can be initialized using the following command. Locale defaults to current environment locale.
Si un système de fichiers Btrfs est utilisé, la copie en écriture doit être désactivée :
```
$ initdb --locale C.UTF-8 --encoding=UTF8 -D /var/lib/postgres/data --data-checksums
# chattr +C /var/lib/postgres
```
PostgreSQL can then be started using the `postgresql` systemd service.
## Configuration initiale
## Usage
### Creating users
The following command can be used:
La base de données peut être initialisée à l'aide de la commande suivante :
```
$ createuser [--interactive]
$ initdb [--locale=C.UTF-8] [--encoding=UTF8] -D /var/lib/postgres/data [--data-checksums]
```
Additionnal options can be used to give permissions to the user (usually not needed).
PostreSQL peut ensuite être démarré à l'aide du service systemd `postgresql`.
Users can be deleted using the following command:
## Utilisation
### Création d'utilisateurs
La commande suivante peut être utilisée :
```
$ createuser [-s/--superuser] [--interactive] [user]
```
Les utilisateurs peuvent être supprimés avec la commande suivante :
```
$ dropuser [-i/--interactive] [user]
```
### Creating databases
### Création de bases de données
The following command can be used:
La commande suivante peut être utilisée :
```
$ createdb [-O owner] [dbname [description]]
```
@ -59,3 +64,5 @@ $ createdb [-O owner] [dbname [description]]
## Sources
1. <https://wiki.archlinux.org/title/PostgreSQL>
[1]: https://www.postgresql.org/docs/current/upgrading.html