forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf7168bd
committed
They are two different problems; the TOC entry is important for any
multiline command or to rerun the command easily later.Whereas displaying the failed SQL command is a matter of fixing theerrormessages.The latter is complicated by failed COPY commands which, withdie-on-errorsoff, results in the data being processed as a command, so dumping thecommand will dump all of the data.In the case of long commands, should the whole command be dumped? eg.(eg.several pages of function definition).In the case of the COPY command, I'm not sure what to do. Obviously, itwould be best to avoid sending the data, but the data and command arecombined (from memory). Also, the 'data' may be in the form of INSERTstatements.Attached patch produces the first 125 chars of the command:pg_restore: [archiver (db)] Error while PROCESSING TOC:pg_restore: [archiver (db)] Error from TOC Entry 26; 1255 16449270FUNCTIONplpgsql_call_handler() pjwpg_restore: [archiver (db)] could not execute query: ERROR: function"plpgsql_call_handler" already exists with same argument types Command was: CREATE FUNCTION plpgsql_call_handler() RETURNSlanguage_handler AS '/var/lib/pgsql-8.0b1/lib/plpgsql', 'plpgsql_call_han...pg_restore: [archiver (db)] Error from TOC Entry 27; 1255 16449271FUNCTIONplpgsql_validator(oid) pjwpg_restore: [archiver (db)] could not execute query: ERROR: function"plpgsql_validator" already exists with same argument types Command was: CREATE FUNCTION plpgsql_validator(oid) RETURNS void AS '/var/lib/pgsql-8.0b1/lib/plpgsql', 'plpgsql_validator' LANGU...Philip Warner1 parentb43fd16 commitf7168bd
File tree
3 files changed
+84
-5
lines changed- src/bin/pg_dump
3 files changed
+84
-5
lines changedLines changed: 53 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
| 140 | + | |
140 | 141 |
| |
141 | 142 |
| |
142 | 143 |
| |
| |||
166 | 167 |
| |
167 | 168 |
| |
168 | 169 |
| |
| 170 | + | |
| 171 | + | |
169 | 172 |
| |
170 | 173 |
| |
171 | 174 |
| |
| |||
211 | 214 |
| |
212 | 215 |
| |
213 | 216 |
| |
| 217 | + | |
| 218 | + | |
214 | 219 |
| |
215 | 220 |
| |
216 | 221 |
| |
217 | 222 |
| |
218 | 223 |
| |
219 | 224 |
| |
| 225 | + | |
| 226 | + | |
220 | 227 |
| |
221 | 228 |
| |
222 | 229 |
| |
| |||
240 | 247 |
| |
241 | 248 |
| |
242 | 249 |
| |
| 250 | + | |
| 251 | + | |
243 | 252 |
| |
244 | 253 |
| |
245 | 254 |
| |
| |||
375 | 384 |
| |
376 | 385 |
| |
377 | 386 |
| |
| 387 | + | |
| 388 | + | |
378 | 389 |
| |
379 | 390 |
| |
380 | 391 |
| |
| |||
391 | 402 |
| |
392 | 403 |
| |
393 | 404 |
| |
| 405 | + | |
| 406 | + | |
394 | 407 |
| |
395 | 408 |
| |
396 | 409 |
| |
| |||
1227 | 1240 |
| |
1228 | 1241 |
| |
1229 | 1242 |
| |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
1230 | 1276 |
| |
1231 | 1277 |
| |
1232 | 1278 |
| |
| |||
2026 | 2072 |
| |
2027 | 2073 |
| |
2028 | 2074 |
| |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
2029 | 2078 |
| |
2030 | 2079 |
| |
2031 | 2080 |
| |
| |||
2317 | 2366 |
| |
2318 | 2367 |
| |
2319 | 2368 |
| |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
2320 | 2372 |
| |
2321 | 2373 |
| |
2322 | 2374 |
| |
|
Lines changed: 15 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
155 | 163 |
| |
156 | 164 |
| |
157 | 165 |
| |
| |||
254 | 262 |
| |
255 | 263 |
| |
256 | 264 |
| |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
257 | 271 |
| |
258 | 272 |
| |
259 | 273 |
| |
|
Lines changed: 16 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| 43 | + | |
| 44 | + | |
43 | 45 |
| |
44 | 46 |
| |
45 | 47 |
| |
| |||
302 | 304 |
| |
303 | 305 |
| |
304 | 306 |
| |
| 307 | + | |
305 | 308 |
| |
306 | 309 |
| |
307 | 310 |
| |
| |||
318 | 321 |
| |
319 | 322 |
| |
320 | 323 |
| |
321 |
| - | |
322 |
| - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
323 | 336 |
| |
324 | 337 |
| |
325 | 338 |
| |
|
0 commit comments
Comments
(0)