From 14ff847ce507cc94663a981f9d676ee45e3813b1 Mon Sep 17 00:00:00 2001 From: jf Date: Tue, 17 Feb 2026 16:03:37 +0100 Subject: [PATCH 1/2] ajout postgresql --- docs/PostgreSQL/2026-02-17-commandes-utiles.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PostgreSQL/2026-02-17-commandes-utiles.md diff --git a/docs/PostgreSQL/2026-02-17-commandes-utiles.md b/docs/PostgreSQL/2026-02-17-commandes-utiles.md new file mode 100644 index 0000000..dff6c5d --- /dev/null +++ b/docs/PostgreSQL/2026-02-17-commandes-utiles.md @@ -0,0 +1,15 @@ +--- +title: "PostgreSQL : Commandes et requêtes utiles" +author: + - JF +date: 2026-02-17 +--- +## Ne lister que les colonnes d'une table +```sql +\set TABLE_NAME 'ma_table' +SELECT column_name FROM information_schema.columns where table_name = :'TABLE_NAME'; +``` +Afficher toutes les tables et leur colonnes avec un début de nom de table : +```sql +SELECT table_name, column_name FROM information_schema.columns where table_name like debutnom%; +``` \ No newline at end of file -- 2.49.1 From bc6595ac384829969af762b89a1a7a8ffe881de1 Mon Sep 17 00:00:00 2001 From: jf Date: Tue, 17 Feb 2026 16:05:49 +0100 Subject: [PATCH 2/2] publication de la page --- mkdocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 537f75f..7b357c8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -24,6 +24,8 @@ nav: - Linux: - "Linux/2025-05-20-bash-life.md" - "Linux/2019-07-09-manipulations-LVM.md" + - PostgreSQL: + - "PostgreSQL/2026-02-17-commandes-utiles.md" - About: about.md theme: readthedocs -- 2.49.1