forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitba8e20a
committed
> Alvaro Herrera <alvherre@atentus.com> writes:
> > I'm looking at pg_dump/common.c:flagInhAttrs() and suspect that it can> > be more or less rewritten completely, and probably should to get rigth> > all the cases mentioned in the past attisinherited discussion. Is this> > desirable for 7.3? It can probably be hacked around and the rewrite> > kept for 7.4, but I think it will be much simpler after the rewrite.>> If it's a bug then it's fair game to fix in 7.3. But keep in mind that> pg_dump has to behave at least somewhat sanely when called against older> servers ... will your rewrite behave reasonably if the server does not> offer attinhcount values?Nah. I don't think it's worth it: I had forgotten that older versionsshould be supported. I just left the code as is and added aversion-specific test.This patch allows pg_dump to dump correctly local definition of columns.In particular,CREATE TABLE p1 (f1 int, f2 int);CREATE TABLE p2 (f1 int);CREATE TABLE c () INHERITS (p1, p2);ALTER TABLE ONLY p1 DROP COLUMN f1;CREATE TABLE p3 (f1 int);CREATE TABLE c2 (f1 int) INHERITS (p3);Will be dumped asCREATE TABLE p1 (f2 int);CREATE TABLE p2 (f1 int);CREATE TABLE c (f1 int) INHERITS (p1, p2);CREATE TABLE c2 (f1 int) INHERITS (p3);(Previous version will dumpCREATE TABLE c () INHERITS (p1, p2)CREATE TABLE c2 () INHERITS (p3) )Alvaro Herrera1 parentd015dcb commitba8e20a
3 files changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
294 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
295 | 296 | | |
296 | 297 | | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
362 | 370 | | |
363 | 371 | | |
364 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
2356 | 2356 | | |
2357 | 2357 | | |
2358 | 2358 | | |
| 2359 | + | |
2359 | 2360 | | |
2360 | 2361 | | |
2361 | 2362 | | |
| |||
2397 | 2398 | | |
2398 | 2399 | | |
2399 | 2400 | | |
2400 | | - | |
| 2401 | + | |
2401 | 2402 | | |
2402 | 2403 | | |
2403 | 2404 | | |
| |||
2413 | 2414 | | |
2414 | 2415 | | |
2415 | 2416 | | |
2416 | | - | |
| 2417 | + | |
2417 | 2418 | | |
2418 | 2419 | | |
2419 | 2420 | | |
| |||
2425 | 2426 | | |
2426 | 2427 | | |
2427 | 2428 | | |
2428 | | - | |
| 2429 | + | |
2429 | 2430 | | |
2430 | 2431 | | |
2431 | 2432 | | |
| |||
2451 | 2452 | | |
2452 | 2453 | | |
2453 | 2454 | | |
| 2455 | + | |
2454 | 2456 | | |
2455 | 2457 | | |
2456 | 2458 | | |
2457 | 2459 | | |
2458 | 2460 | | |
2459 | 2461 | | |
2460 | 2462 | | |
| 2463 | + | |
2461 | 2464 | | |
2462 | 2465 | | |
2463 | 2466 | | |
| |||
2473 | 2476 | | |
2474 | 2477 | | |
2475 | 2478 | | |
| 2479 | + | |
2476 | 2480 | | |
2477 | 2481 | | |
2478 | 2482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
0 commit comments
Comments
(0)