﻿{"id":3622,"date":"2016-11-09T11:32:44","date_gmt":"2016-11-09T10:32:44","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=3622"},"modified":"2017-04-28T08:35:50","modified_gmt":"2017-04-28T07:35:50","slug":"migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/","title":{"rendered":"Migrer des bases postgresql avec PgAdmin 4:probl\u00e8mes et solutions"},"content":{"rendered":"<h2>Mise \u00e0 jour du 28\/04\/2017<\/h2>\n<div class='stb-container stb-style-alert'><div class='stb-caption'><div class='stb-logo'><img class='stb-logo__image' src='data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN\/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz\/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH\/w\/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA\/g88wAAKCRFRHgg\/P9eM4Ors7ONo62Dl8t6r8G\/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt\/qIl7gRoXgugdfeLZrIPQLUAoOnaV\/N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img'\/><\/div><div class='stb-caption-content'><\/div><div class='stb-tool'><\/div><\/div><div class='stb-content'>Le probl\u00e8me soulev\u00e9 ici a \u00e9t\u00e9 r\u00e9solu par l&rsquo;\u00e9quipe de <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/cartes-enc-dans-qgis-avec-postgis1\/\">pgAdmin<\/a> (test\u00e9 sur la version 1.4 de pgAdmin). Si vous trouvez ce probl\u00e8me et que vous avez une version ant\u00e9rieure de pgAdmin 4, il suffit de t\u00e9l\u00e9charger et installer la derni\u00e8re version). Par contre la m\u00e9thode peut toujours servir pour contourner des \u00e9ventuelles erreurs de pgAdmin, en r\u00e9utilisant la syntaxe r\u00e9cup\u00e9r\u00e9e sur la fen\u00eatre d&rsquo;erreur)<\/div><\/div>\n<p>Depuis peu, la nouvelle version de PostgreSQL 9.6 est disponible. Parmi les nouveaut\u00e9s, une nouvelle interface du client PgAdmin est disponible (PgAdmin 4 v1.1).<br \/>\nSi vous voulez migrer vos bases de donn\u00e9es d&rsquo;une version pr\u00e9c\u00e9dente de PostgreSQL vers une base 9.6, ce n&rsquo;est pas gagn\u00e9!<br \/>\nTout d&rsquo;abord plantons le d\u00e9cor: je ne parlerai que du travail sous Windows, je n&rsquo;ai pas des infos si ceci arrive aussi sous Linux. Deuxi\u00e8mement, j&rsquo;ai report\u00e9 le bug depuis un mois \u00e0 l&rsquo;\u00e9quipe de PgAdmin mais pour l&rsquo;instant il n&rsquo;a pas \u00e9t\u00e9 pris en charge. Mais comme il faut bien continuer \u00e0 travailler en attendant que le probl\u00e8me soit r\u00e9solu, voici un moyen de contourner le probl\u00e8me.<br \/>\n<!--more--><br \/>\nCommen\u00e7ons par le probl\u00e8me.<br \/>\nSi vous avez des bases de donn\u00e9es PostgreSQL dans des versions ant\u00e9rieures (9.5 et moins) et que vous voulez les faire migrer vers une base PostgreSQL 9.6<br \/>\n<a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3624\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg40\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png?fit=810%2C677&amp;ssl=1\" data-orig-size=\"810,677\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg40\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png?fit=640%2C535&amp;ssl=1\" class=\"aligncenter size-full wp-image-3624\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png?resize=640%2C535\" alt=\"pgadmin4\" width=\"640\" height=\"535\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png?w=810&amp;ssl=1 810w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png?resize=300%2C251&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg40.png?resize=768%2C642&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Dans cet exemple, nous voulons migrer toutes les tables contenues dans la base de donn\u00e9es postgis_22_sample du serveur postgreSQL 9.5 vers la base de donn\u00e9es postgis_23_sample du serveur postgreSQL 9.6.<\/p>\n<p>La m\u00e9thode avec PgAdmin est de faire une sauvegarde de la premi\u00e8re base vers un fichier externe (.backup), puis de restaurer ce fichier dans la deuxi\u00e8me base.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg41.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3625\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg41\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg41.png?fit=197%2C278&amp;ssl=1\" data-orig-size=\"197,278\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg41\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg41.png?fit=197%2C278&amp;ssl=1\" class=\"aligncenter size-full wp-image-3625\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg41.png?resize=197%2C278\" alt=\"backup d'une base avec pgadmin 4\" width=\"197\" height=\"278\" \/><\/a>Avec PgAdmlin 4 il y a une nouvelle option qui permet d&rsquo;exporter une table vers un fichier texte, puis de l&rsquo;importer dans la nouvelle base. Mais ceci s&rsquo;applique \u00e0 une seule table.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg42.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3626\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg42\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg42.png?fit=188%2C351&amp;ssl=1\" data-orig-size=\"188,351\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg42\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg42.png?fit=188%2C351&amp;ssl=1\" class=\"aligncenter size-full wp-image-3626\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg42.png?resize=188%2C351\" alt=\"commande import\/export de pgadmin 4\" width=\"188\" height=\"351\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg42.png?w=188&amp;ssl=1 188w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg42.png?resize=161%2C300&amp;ssl=1 161w\" sizes=\"auto, (max-width: 188px) 100vw, 188px\" \/><\/a><\/p>\n<p>Sachez aussi que les deux m\u00e9thodes plantent pareil&#8230;<\/p>\n<p>On lance le backup de la base postgis_22_sample<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3627\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg43\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?fit=1256%2C615&amp;ssl=1\" data-orig-size=\"1256,615\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg43\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?fit=640%2C313&amp;ssl=1\" class=\"aligncenter size-large wp-image-3627\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43-1024x501.png?resize=640%2C313\" alt=\"fen\u00eatre backup de pgadmin 4\" width=\"640\" height=\"313\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?resize=1024%2C501&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?resize=300%2C147&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?resize=768%2C376&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?resize=1200%2C588&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg43.png?w=1256&amp;ssl=1 1256w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>On choisit seulement le r\u00e9pertoire et nom du fichier de sauvegarde, puis on clique sur <em><strong>backup.<\/strong><\/em><\/p>\n<p>Dans le coin bas-droit de l&rsquo;\u00e9cran vous verrez la fen\u00eatre de suivi du processus:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg44.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3628\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg44\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg44.png?fit=303%2C191&amp;ssl=1\" data-orig-size=\"303,191\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg44\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg44.png?fit=303%2C191&amp;ssl=1\" class=\"aligncenter size-full wp-image-3628\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg44.png?resize=303%2C191\" alt=\"suivi d'un processus dans pgadmin 4\" width=\"303\" height=\"191\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg44.png?w=303&amp;ssl=1 303w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg44.png?resize=300%2C189&amp;ssl=1 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/a>Au bout de quelques secondes, la message indique une erreur:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg45.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3629\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg45\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg45.png?fit=298%2C185&amp;ssl=1\" data-orig-size=\"298,185\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg45\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg45.png?fit=298%2C185&amp;ssl=1\" class=\"aligncenter size-full wp-image-3629\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg45.png?resize=298%2C185\" alt=\"erreur du processus dans pgadmin 4\" width=\"298\" height=\"185\" \/><\/a>Cliquez sur le lien \u00ab\u00a0Click here for details\u00a0\u00bb pour ouvrir la fen\u00eatre d&rsquo;information<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3630\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg46\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png?fit=971%2C557&amp;ssl=1\" data-orig-size=\"971,557\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg46\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png?fit=640%2C367&amp;ssl=1\" class=\"aligncenter size-full wp-image-3630\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png?resize=640%2C367\" alt=\"fen\u00eatre de d\u00e9tail du processus de pgadmin 4\" width=\"640\" height=\"367\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg46.png?resize=768%2C441&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Le message d&rsquo;erreur indique que le Codec UTF-8 a plant\u00e9.<\/p>\n<p>C&rsquo;est ce type de message que vous aurez:<\/p>\n<ul>\n<li>si vous essayez de sauvegarder une base d&rsquo;une version pr\u00e9c\u00e9dente<\/li>\n<li>si vous essayez de restaurer une base \u00e0 partir d&rsquo;un fichier cr\u00e9\u00e9 sous une version pr\u00e9c\u00e9dente<\/li>\n<li>si vous essayez d&rsquo;exporter une table avec la commande Export\/Import<\/li>\n<\/ul>\n<p>Le moyen de contourner le probl\u00e8me, c&rsquo;est de ne pas utiliser PgAdmin 4 pour effectuer l&rsquo;op\u00e9ration. Avec la souris, s\u00e9lectionnez le texte de la \u00ab\u00a0Running command\u00a0\u00bb:<\/p>\n<ul>\n<li><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3631\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg47\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png?fit=967%2C247&amp;ssl=1\" data-orig-size=\"967,247\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg47\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png?fit=640%2C163&amp;ssl=1\" class=\"aligncenter size-full wp-image-3631\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png?resize=640%2C163\" alt=\"s\u00e9lection de la commande de pgAdmin 4\" width=\"640\" height=\"163\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png?w=967&amp;ssl=1 967w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png?resize=300%2C77&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg47.png?resize=768%2C196&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Appuyez sur Ctrl C pour copier ce texte dans le presse papier.<\/li>\n<li>Ouvrez un fichier texte sur votre bureau (clic droit sur le bureau -&gt; Nouveau -&gt; Document texte)<\/li>\n<li>Collez le texte de la commande<\/li>\n<\/ul>\n<p>Nous allons ex\u00e9cuter cette commande \u00e0 partir d&rsquo;une fen\u00eatre de commandes. Le probl\u00e8me c&rsquo;est que, telle qu&rsquo;elle, elle ne pourra pas s&rsquo;ex\u00e9cuter \u00e0 cause des espaces dans l&rsquo;arborescence du programme (pgdump.exe). Pour qu&rsquo;elle puisse s\u2019ex\u00e9cuter nous devons entourer le texte<\/p>\n<p><em><strong>C:\\Program Files\\PostgreSQL\\9.6\\bin\\pg_dump.exe<\/strong><\/em><\/p>\n<p>Avec des guillemets. Le texte de la commande dans notre fichier texte devient alors:<\/p>\n<p><em><strong>\u00ab\u00a0C:\\Program Files\\PostgreSQL\\9.6\\bin\\pg_dump.exe\u00a0\u00bb &#8211;file \u00ab\u00a0C:\/tmp\/base95.backup\u00a0\u00bb &#8211;host \u00ab\u00a0localhost\u00a0\u00bb &#8211;port \u00ab\u00a05432\u00a0\u00bb &#8211;username \u00ab\u00a0postgres\u00a0\u00bb &#8211;no-password &#8211;verbose &#8211;format=c &#8211;blobs \u00ab\u00a0postgis_22_sample\u00a0\u00bb<\/strong><\/em><\/p>\n<p>Ouvrez un fen\u00eatre de commandes<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg48.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3633\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg48\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg48.png?fit=324%2C638&amp;ssl=1\" data-orig-size=\"324,638\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg48\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg48.png?fit=324%2C638&amp;ssl=1\" class=\"aligncenter size-full wp-image-3633\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg48.png?resize=324%2C638\" alt=\"ouverture d'une invite de commandes\" width=\"324\" height=\"638\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg48.png?w=324&amp;ssl=1 324w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg48.png?resize=152%2C300&amp;ssl=1 152w\" sizes=\"auto, (max-width: 324px) 100vw, 324px\" \/><\/a>Copiez le texte de la commande dans le presse papier, cliquez droit sur la fen\u00eatre de commandes et s\u00e9lectionnez <em><strong>Coller<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg49.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3634\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg49\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg49.png?fit=498%2C331&amp;ssl=1\" data-orig-size=\"498,331\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg49\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg49.png?fit=498%2C331&amp;ssl=1\" class=\"aligncenter size-full wp-image-3634\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg49.png?resize=498%2C331\" alt=\"commande dans l'invite de commandes\" width=\"498\" height=\"331\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg49.png?w=498&amp;ssl=1 498w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg49.png?resize=300%2C199&amp;ssl=1 300w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/><\/a>Tapez sur Entr\u00e9e, la commande s&rsquo;ex\u00e9cute sans erreur, cette fois-ci.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg50.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3635\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg50\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg50.png?fit=501%2C335&amp;ssl=1\" data-orig-size=\"501,335\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg50\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg50.png?fit=501%2C335&amp;ssl=1\" class=\"aligncenter size-full wp-image-3635\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg50.png?resize=501%2C335\" alt=\"commande ex\u00e9cut\u00e9e dans l'invite de commandes\" width=\"501\" height=\"335\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg50.png?w=501&amp;ssl=1 501w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg50.png?resize=300%2C201&amp;ssl=1 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a>Nous avons maintenant notre fichier backup de la base postgresql 9.5.<\/p>\n<p>Pour la charger dans notre base postgresql 9.6 nous allons suivre la m\u00eame proc\u00e9dure:<\/p>\n<ul>\n<li>utiliser la commande de pgadmin 4 qui plante<\/li>\n<li>r\u00e9cup\u00e9rer le texte de la commande<\/li>\n<li>l&rsquo;ex\u00e9cuter dans une fen\u00eatre de commandes<\/li>\n<\/ul>\n<p>Dans pgAdmin 4 positionnez-vous sur la base de donn\u00e9es 9.6 qui doit recueillir les tables sauvegard\u00e9es.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg52.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3637\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg52\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg52.png?fit=407%2C359&amp;ssl=1\" data-orig-size=\"407,359\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg52\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg52.png?fit=407%2C359&amp;ssl=1\" class=\"aligncenter size-large wp-image-3637\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg52.png?resize=407%2C359\" alt=\"pg52\" width=\"407\" height=\"359\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg52.png?w=407&amp;ssl=1 407w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg52.png?resize=300%2C265&amp;ssl=1 300w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/a> Ouvrez le menu contextuel de cette base et s\u00e9lectionnez <em><strong>Restore<\/strong><\/em><\/p>\n<p>Renseignez le fichier \u00e0 restaurer (celui que nous avons sauvegard\u00e9 dans l&rsquo;\u00e9tape pr\u00e9c\u00e9dente) et cliquez sur <em><strong>Restore<\/strong><\/em><\/p>\n<p>La fen\u00eatre d&rsquo;info devrait s&rsquo;afficher en bas \u00e0 droite<\/p>\n<p><em><strong><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg54.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3639\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg54\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg54.png?fit=297%2C171&amp;ssl=1\" data-orig-size=\"297,171\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg54\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg54.png?fit=297%2C171&amp;ssl=1\" class=\"aligncenter size-large wp-image-3639\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg54.png?resize=297%2C171\" alt=\"pg54\" width=\"297\" height=\"171\" \/><\/a><\/strong><\/em><\/p>\n<p>Si elle ne s&rsquo;affiche pas (ce qui arrive souvent) allez dans le menu de pgAdmin 4 (la barre de menu en haut de la fen\u00eatre) et s\u00e9lectionnez File -&gt; reset layout.<\/p>\n<p>Cliquez sur le lien <em><strong>Click here for details<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3640\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg55\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png?fit=975%2C552&amp;ssl=1\" data-orig-size=\"975,552\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg55\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png?fit=640%2C362&amp;ssl=1\" class=\"aligncenter size-large wp-image-3640\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png?resize=640%2C363\" alt=\"pg55\" width=\"640\" height=\"363\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png?w=975&amp;ssl=1 975w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png?resize=300%2C170&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg55.png?resize=768%2C435&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>S\u00e9lectionnez la ligne de commande et copiez-collez cette ligne dans le fichier texte.<\/p>\n<p>Entourez la commande restore.exe avec des guillemets:<\/p>\n<p><em><strong>\u00ab\u00a0C:\\Program Files\\PostgreSQL\\9.6\\bin\\pg_restore.exe\u00a0\u00bb &#8211;host \u00ab\u00a0localhost\u00a0\u00bb &#8211;port \u00ab\u00a05433\u00a0\u00bb &#8211;username \u00ab\u00a0postgres\u00a0\u00bb &#8211;no-password &#8211;dbname \u00ab\u00a0postgis_23_sample\u00a0\u00bb &#8211;verbose \u00ab\u00a0C:\/tmp\/base95.backup\u00a0\u00bb<\/strong><\/em><\/p>\n<p>Copiez cette ligne dans le presse-papier, puis collez-la dans la fen\u00eatre de commandes:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg56.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3643\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg56\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg56.png?fit=500%2C335&amp;ssl=1\" data-orig-size=\"500,335\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg56\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg56.png?fit=500%2C335&amp;ssl=1\" class=\"aligncenter size-full wp-image-3643\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg56.png?resize=500%2C335\" alt=\"pg56\" width=\"500\" height=\"335\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg56.png?w=500&amp;ssl=1 500w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg56.png?resize=300%2C201&amp;ssl=1 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a>Une fois la commande ex\u00e9cut\u00e9e, vous pouvez ouvrir la base dans pgAdmin 4<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg57.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3644\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/migrer-des-bases-postgresql-avec-pgadmin-4problemes-et-solutions\/pg57\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg57.png?fit=457%2C945&amp;ssl=1\" data-orig-size=\"457,945\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pg57\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg57.png?fit=457%2C945&amp;ssl=1\" class=\"aligncenter size-full wp-image-3644\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg57.png?resize=457%2C945\" alt=\"pg57\" width=\"457\" height=\"945\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg57.png?w=457&amp;ssl=1 457w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/11\/pg57.png?resize=145%2C300&amp;ssl=1 145w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/a>Vous pourrez constater que les tables ont bien \u00e9t\u00e9 charg\u00e9es dans la nouvelle base postgresql 9.6.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mise \u00e0 jour du 28\/04\/2017 Depuis peu, la nouvelle version de PostgreSQL 9.6 est disponible. Parmi les nouveaut\u00e9s, une nouvelle interface du client PgAdmin est disponible (PgAdmin 4 v1.1). Si vous voulez migrer vos bases de&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[311],"tags":[188,347,227,312],"class_list":["post-3622","post","type-post","status-publish","format-standard","hentry","category-postgresql","tag-migration","tag-pgadmin-4","tag-postgis","tag-postgresql"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-Wq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=3622"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3622\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=3622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=3622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=3622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}