PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 Re : Général » Problème pour créer collation » 23/04/2018 16:51:06

Évidemment, merci.
Désolé pour mes questions répétitives mais je débute avec postgres et pgAdmin.
Je tente de restaurer un dump sur ma base nouvellement créé et vous recontacte au besoin ?

#2 Re : Général » Problème pour créer collation » 23/04/2018 16:42:27

Je viens de tester à la main, j’ai ce retour erreur :

New collation French_France.1252 is incompatible with the collation of the template database <C>.
Use the same collation as in the template database  or use template 0 as template.

Ma commande sql était :
Create database Jeremy
With owner jeremy
Encoding =‘UTF8’
Tablespace =pg_default
LC_COLLATE= ´French_France.1252’
LC_CTYPE = ´French_France.1252’
Connection limit = -1;

#3 Re : Général » Problème pour créer collation » 23/04/2018 16:02:43

Comment puis je faire alors pour ajouter la collation fr_FR.UTF8 ?

#4 Re : Général » Problème pour créer collation » 23/04/2018 15:44:36

Votre commande a fonctionné, mais le france.1252 correspond bien à de l’utf8 ?

Malgré la relance de pgAdmin, pour ajouter une base de données, je n’ai que le choix de C ou posix sans collation, ça n’a pas changé malgré le succès de l’ajout France.1252 dans la table pg_collation

#6 Général » Problème pour créer collation » 23/04/2018 09:07:45

GDS_Strou
Réponses : 11

Bonjour.
Je viens d’installer un postgresql portable et lors de la création d’une nouvelle base, l’interface me propose uniquement en choix de collation C ou POSIX.

J’essai donc en vain de créer la locale fr_FR.UTF8 mais je n’y parviens pas.

La commande create collation fr_FR (LOCALE=‘fr_FR.UTF8’); me renvoiel’erreur suivante :

Could not create locale fr_FR.UTF8: unrecognized winsock error 10004

Auriez vous une idée ? Merci d’avance

#7 Re : Général » Erreur sur pg_restore » 20/04/2018 10:05:06

Voici le retour de votre commande

;

; Archive created at 2018-03-30 10:44:43

;     dbname: jeremy

;     TOC Entries: 228

;     Compression: -1

;     Dump Version: 1.12-0

;     Format: CUSTOM

;     Integer: 4 bytes

;     Offset: 8 bytes

;     Dumped from database version: 8.3.7

;     Dumped by pg_dump version: 9.5.3

;

;

; Selected TOC Entries:

;

2238; 0 0 ENCODING - ENCODING

2239; 0 0 STDSTRINGS - STDSTRINGS

2240; 1262 66019 DATABASE - jeremy jeremy

6; 2615 2200 SCHEMA - public postgres

2241; 0 0 COMMENT - SCHEMA public postgres

;              depends on: 6

2242; 0 0 ACL - public postgres

;              depends on: 6

681; 2612 66022 PROCEDURAL LANGUAGE - plpgsql jeremy

218; 1255 66023 FUNCTION public set_chrono() jeremy

;              depends on: 6 681

219; 1255 66024 FUNCTION public unaccent_string(text) jeremy

;              depends on: 6

127; 1259 66025 SEQUENCE public docx_template_id_seq jeremy

;              depends on: 6

128; 1259 66027 TABLE public docx_template jeremy

;              depends on: 127 6

129; 1259 66034 SEQUENCE public dossier_id_seq jeremy

;              depends on: 6

130; 1259 66036 TABLE public dossier jeremy

;              depends on: 129 6

131; 1259 66043 SEQUENCE public dossier_action_id_seq jeremy

;              depends on: 6

132; 1259 66045 TABLE public dossier_action jeremy

;              depends on: 131 6

133; 1259 66060 SEQUENCE public dossier_attachment_id_seq jeremy

;              depends on: 6

134; 1259 66062 TABLE public dossier_attachment jeremy

;              depends on: 136 6

135; 1259 66104 SEQUENCE public logger_id_seq jeremy

;              depends on: 6

136; 1259 66106 TABLE public logger jeremy

;              depends on: 147 6

137; 1259 66113 SEQUENCE public message_du_jour_id_seq jeremy

;              depends on: 6

138; 1259 66115 TABLE public message_du_jour jeremy

;              depends on: 149 6

139; 1259 66119 SEQUENCE public ref_action_id_seq jeremy

;              depends on: 6

140; 1259 66121 TABLE public ref_action jeremy

;              depends on: 151 6

141; 1259 66186 SEQUENCE public ref_position_id_seq jeremy

;              depends on: 6

142; 1259 66188 TABLE public ref_position jeremy

;              depends on: 166 6

143; 1259 66194 SEQUENCE public ref_service_id_seq jeremy

;              depends on: 6

144; 1259 66196 TABLE public ref_service jeremy

;              depends on: 168 6

145; 1259 66202 SEQUENCE public ref_theme_id_seq jeremy

;              depends on: 6

146; 1259 66204 TABLE public ref_theme jeremy

;              depends on: 170 6

147; 1259 66213 SEQUENCE public requerant_id_seq jeremy

;              depends on: 6

148; 1259 66215 TABLE public requerant jeremy

;              depends on: 172 6

149; 1259 66242 TABLE public requete jeremy

;              depends on: 178 6

150; 1259 66252 TABLE public requete_colonne jeremy

;              depends on: 6

151; 1259 66255 TABLE public requete_critere jeremy

;              depends on: 6

152; 1259 66261 SEQUENCE public requete_stat_id_seq jeremy

;              depends on: 6

153; 1259 66263 TABLE public requete_stat jeremy

;              depends on: 182 6

154; 1259 66270 TABLE public requete_stat_critere jeremy

;              depends on: 6

155; 1259 66276 SEQUENCE public sec_role_id_seq jeremy

;              depends on: 6

156; 1259 66278 TABLE public sec_role jeremy

;              depends on: 185 6

157; 1259 66282 TABLE public sec_role_permission jeremy

;              depends on: 6

158; 1259 66285 SEQUENCE public sec_user_id_seq jeremy

;              depends on: 6

159; 1259 66287 TABLE public sec_user jeremy

;              depends on: 188 6

160; 1259 66296 TABLE public sec_user_sec_role jeremy

;              depends on: 6

162; 1259 66299 SEQUENCE public stat_annee_effectif_id_seq jeremy

;              depends on: 6

162; 1259 66301 TABLE public stat_annee_effectif jeremy

;              depends on: 191 6

163; 1259 66305 TABLE public stat_effectif jeremy

;              depends on: 6

2170; 0 66027 TABLE DATA public docx_template jeremy

;              depends on: 128

2243; 0 0 SEQUENCE SET public docx_template_id_seq jeremy

;              depends on: 127

2172; 0 66036 TABLE DATA public dossier jeremy

;              depends on: 130

2174; 0 66045 TABLE DATA public dossier_action jeremy

;              depends on: 132

2246; 0 0 SEQUENCE SET public dossier_action_id_seq jeremy

;              depends on: 131

2179; 0 66062 TABLE DATA public dossier_attachment jeremy

;              depends on: 137

2247; 0 0 SEQUENCE SET public dossier_attachment_id_seq jeremy

;              depends on: 136

2248; 0 0 SEQUENCE SET public dossier_id_seq jeremy

;              depends on: 129

2190; 0 66106 TABLE DATA public logger jeremy

;              depends on: 148

2254; 0 0 SEQUENCE SET public logger_id_seq jeremy

;              depends on: 147

2192; 0 66115 TABLE DATA public message_du_jour jeremy

;              depends on: 150

2255; 0 0 SEQUENCE SET public message_du_jour_id_seq jeremy

;              depends on: 149

2194; 0 66121 TABLE DATA public ref_action jeremy

;              depends on: 152

2256; 0 0 SEQUENCE SET public ref_action_id_seq jeremy

;              depends on: 151

2209; 0 66188 TABLE DATA public ref_position jeremy

;              depends on: 167

2264; 0 0 SEQUENCE SET public ref_position_id_seq jeremy

;              depends on: 166

2211; 0 66196 TABLE DATA public ref_service jeremy

;              depends on: 169

2265; 0 0 SEQUENCE SET public ref_service_id_seq jeremy

;              depends on: 168

2213; 0 66204 TABLE DATA public ref_theme jeremy

;              depends on: 171

2266; 0 0 SEQUENCE SET public ref_theme_id_seq jeremy

;              depends on: 170

2215; 0 66215 TABLE DATA public requerant jeremy

;              depends on: 173

2268; 0 0 SEQUENCE SET public requerant_id_seq jeremy

;              depends on: 172

2221; 0 66242 TABLE DATA public requete jeremy

;              depends on: 179

2222; 0 66252 TABLE DATA public requete_colonne jeremy

;              depends on: 180

2223; 0 66255 TABLE DATA public requete_critere jeremy

;              depends on: 181

2269; 0 0 SEQUENCE SET public requete_id_seq jeremy

;              depends on: 178

2225; 0 66263 TABLE DATA public requete_stat jeremy

;              depends on: 183

2226; 0 66270 TABLE DATA public requete_stat_critere jeremy

;              depends on: 184

2270; 0 0 SEQUENCE SET public requete_stat_id_seq jeremy

;              depends on: 182

2228; 0 66278 TABLE DATA public sec_role jeremy

;              depends on: 186

2271; 0 0 SEQUENCE SET public sec_role_id_seq jeremy

;              depends on: 185

2229; 0 66282 TABLE DATA public sec_role_permission jeremy

;              depends on: 187

2231; 0 66287 TABLE DATA public sec_user jeremy

;              depends on: 189

2272; 0 0 SEQUENCE SET public sec_user_id_seq jeremy

;              depends on: 188

2232; 0 66296 TABLE DATA public sec_user_sec_role jeremy

;              depends on: 190

2234; 0 66301 TABLE DATA public stat_annee_effectif jeremy

;              depends on: 192

2273; 0 0 SEQUENCE SET public stat_annee_effectif_id_seq jeremy

;              depends on: 191

2235; 0 66305 TABLE DATA public stat_effectif jeremy

;              depends on: 193

1978; 2606 95292 CONSTRAINT public docx_template_pkey jeremy

;              depends on: 128 128

1984; 2606 95296 CONSTRAINT public dossier_action_pkey jeremy

;              depends on: 132 132

1988; 2606 95298 CONSTRAINT public dossier_attachment_pkey jeremy

;              depends on: 137 137

1981; 2606 95308 CONSTRAINT public dossier_pkey jeremy

;              depends on: 130 130

1998; 2606 95310 CONSTRAINT public logger_pkey jeremy

;              depends on: 148 148

2000; 2606 95312 CONSTRAINT public message_du_jour_pkey jeremy

;              depends on: 150 150

2002; 2606 95314 CONSTRAINT public ref_action_pkey jeremy

;              depends on: 152 152

2016; 2606 95328 CONSTRAINT public ref_position_pkey jeremy

;              depends on: 167 167

2018; 2606 95330 CONSTRAINT public ref_service_pkey jeremy

;              depends on: 169 169

2020; 2606 95332 CONSTRAINT public ref_theme_pkey jeremy

;              depends on: 171 171

2022; 2606 95336 CONSTRAINT public requerant_pkey jeremy

;              depends on: 173 173

2026; 2606 95338 CONSTRAINT public requete_pkey jeremy

;              depends on: 179 179

2028; 2606 95340 CONSTRAINT public requete_stat_pkey jeremy

;              depends on: 183 183

2032; 2606 95342 CONSTRAINT public sec_role_permission_pkey jeremy

;              depends on: 187 187 187

2030; 2606 95344 CONSTRAINT public sec_role_pkey jeremy

;              depends on: 186 186

2034; 2606 95346 CONSTRAINT public sec_user_pkey jeremy

;              depends on: 189 189

2038; 2606 95348 CONSTRAINT public sec_user_sec_role_pkey jeremy

;              depends on: 190 190 190

2036; 2606 95350 CONSTRAINT public sec_user_username_key jeremy

;              depends on: 189 189

2040; 2606 95352 CONSTRAINT public stat_annee_effectif_annee_key jeremy

;              depends on: 192 192

2042; 2606 95354 CONSTRAINT public stat_annee_effectif_pkey jeremy

;              depends on: 192 192

1982; 1259 95355 INDEX public dossier_action_idx jeremy

;              depends on: 132 132 132

1979; 1259 95356 INDEX public dossier_numero_recours_idx jeremy

;              depends on: 130

2082; 2620 95357 TRIGGER public dossier_action_chrono jeremy

;              depends on: 218 132

2052; 2606 95358 FK CONSTRAINT public dossier_action_action_id_fkey jeremy

;              depends on: 152 132 2002

2053; 2606 95363 FK CONSTRAINT public dossier_action_attachment_id_fk jeremy

;              depends on: 137 1988 132

2054; 2606 95383 FK CONSTRAINT public dossier_action_dossier_id_fkey jeremy

;              depends on: 132 130 1981

2058; 2606 95388 FK CONSTRAINT public dossier_attachment_dossier_id_fkey jeremy

;              depends on: 130 1981 137

2048; 2606 95438 FK CONSTRAINT public dossier_position_id_fkey jeremy

;              depends on: 2016 130 167

2049; 2606 95443 FK CONSTRAINT public dossier_rapporteur_id_fkey jeremy

;              depends on: 130 189 2034

2050; 2606 95448 FK CONSTRAINT public dossier_requerant_id_fkey jeremy

;              depends on: 173 130 2022

2051; 2606 95453 FK CONSTRAINT public dossier_theme_id_fkey jeremy

;              depends on: 2020 130 171

2065; 2606 95483 FK CONSTRAINT public requerant_service_id_fkey jeremy

;              depends on: 173 2018 169

2070; 2606 95488 FK CONSTRAINT public requete_colonne_requete_id_fkey jeremy

;              depends on: 179 180 2026

2071; 2606 95493 FK CONSTRAINT public requete_critere_requete_id_fkey jeremy

;              depends on: 181 179 2026

2072; 2606 95498 FK CONSTRAINT public requete_stat_critere_requete_stat_id_fkey jeremy

;              depends on: 184 183 2028

2069; 2606 95503 FK CONSTRAINT public requete_user_id_fkey jeremy

;              depends on: 179 189 2034

2073; 2606 95508 FK CONSTRAINT public sec_role_permission_role_id_fkey jeremy

;              depends on: 187 186 2030

2075; 2606 95518 FK CONSTRAINT public sec_user_requete_id_fkey jeremy

;              depends on: 189 179 2026

2077; 2606 95523 FK CONSTRAINT public sec_user_sec_role_role_id_fkey jeremy

;              depends on: 190 186 2030

2078; 2606 95528 FK CONSTRAINT public sec_user_sec_role_user_id_fkey jeremy

;              depends on: 2034 189 190

2076; 2606 95533 FK CONSTRAINT public sec_user_service_id_fkey jeremy

;              depends on: 189 2018 169

2080; 2606 95543 FK CONSTRAINT public stat_effectif_service_id_fkey jeremy

;              depends on: 169 2018 193

2081; 2606 95548 FK CONSTRAINT public stat_effectif_stat_annee_effectif_id_fkey jeremy

;              depends on: 193 192 2042

#8 Re : Général » Erreur sur pg_restore » 20/04/2018 09:27:42

Ça n’a pas l’air de fonctionner, désolé je débute avec pgAdmin et Postgres.

postgres=# pg_restore -l -v geremi.dmp > log.txt;

ERROR:  syntax error at or near "pg_restore"

LINE 1: pg_restore -l -v geremi.dmp > log.txt;
            ^

postgres=#

#9 Re : Général » Erreur sur pg_restore » 20/04/2018 09:03:42

Je n’ai pas la commande qui a fait le dump car l’application est hébergé loin de chez moi et on m’a Mis le dump à disposition sur un FTP.

Le dump fait 40go et la table qui plante est la plus volumineuse car elle contient des pdf générés via l’application.
Le problème pourrait venir de la taille de la table ?

#10 Général » Erreur sur pg_restore » 20/04/2018 08:30:03

GDS_Strou
Réponses : 7

Bonjour,
J'ai un Dump de ma BDD mais lorsque je veux le restaurer sur ma base locale via pgAdmin3, j’ai le code sortie -1 avec le message d’erreur ci-dessous.
Le programme restaure bien les 4 premières tables mais il plante à chaque fois sur la 5ieme avec ce message d’erreur.
Je ne trouve aucune explication sur internet, quelqun’un a une idée ?
Merci d’avance

pg_restore: [programme d'archivage personnalise] n'a pas pu lire a partir dunfichier en entree: fin du fichier

Log erreur complet :

E:\logiciels\PostgreSQL\PostgreSQLPortable-9.3\App\PgSQL64\bin\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "bddjeremy" --role "jeremy" --no-password  --single-transaction --verbose "E:\PROJETS\JEREMY\jeremy.dmp"

pg_restore: connexion à la base de données pour la restauration

pg_restore: création de SCHEMA public

pg_restore: création de COMMENT SCHEMA public

pg_restore: création de PROCEDURAL LANGUAGE plpgsql

pg_restore: création de FUNCTION set_chrono()

pg_restore: création de FUNCTION unaccent_string(text)

pg_restore: création de SEQUENCE docx_template_id_seq

pg_restore: création de TABLE docx_template

pg_restore: création de SEQUENCE dossier_id_seq

pg_restore: création de TABLE dossier

pg_restore: création de SEQUENCE dossier_action_id_seq

pg_restore: création de TABLE dossier_action

pg_restore: création de SEQUENCE dossier_attachment_id_seq

pg_restore: création de TABLE dossier_attachment

pg_restore: création de SEQUENCE logger_id_seq

pg_restore: création de TABLE logger

pg_restore: création de SEQUENCE message_du_jour_id_seq

pg_restore: création de TABLE message_du_jour

pg_restore: création de SEQUENCE ref_action_id_seq

pg_restore: création de TABLE ref_action

pg_restore: création de SEQUENCE ref_position_id_seq

pg_restore: création de TABLE ref_position

pg_restore: création de SEQUENCE ref_service_id_seq

pg_restore: création de TABLE ref_service

pg_restore: création de SEQUENCE ref_theme_id_seq

pg_restore: création de TABLE ref_theme

pg_restore: création de SEQUENCE requerant_id_seq

pg_restore: création de TABLE requerant

pg_restore: création de SEQUENCE requete_id_seq

pg_restore: création de TABLE requete

pg_restore: création de TABLE requete_colonne

pg_restore: création de TABLE requete_critere

pg_restore: création de SEQUENCE requete_stat_id_seq

pg_restore: création de TABLE requete_stat

pg_restore: création de TABLE requete_stat_critere

pg_restore: création de SEQUENCE sec_role_id_seq

pg_restore: création de TABLE sec_role

pg_restore: création de TABLE sec_role_permission

pg_restore: création de SEQUENCE sec_user_id_seq

pg_restore: création de TABLE sec_user

pg_restore: création de TABLE sec_user_sec_role

pg_restore: création de SEQUENCE stat_annee_effectif_id_seq

pg_restore: création de TABLE stat_annee_effectif

pg_restore: création de TABLE stat_effectif

pg_restore: traitement des données de la table « docx_template »

pg_restore: exécution de SEQUENCE SET docx_template_id_seq

pg_restore: traitement des données de la table « dossier »

pg_restore: traitement des données de la table « dossier_action »

pg_restore: exécution de SEQUENCE SET dossier_action_id_seq

Pied de page des forums

Propulsé par FluxBB