forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1ead020
committed
Fix CREATE TABLE ... LIKE ... WITH OIDS.
Having a WITH OIDS specification should result in the creation of an OIDcolumn, but commitb943f50 broke that in the case that there were LIKEtables without OIDS. Commentary in that patch makes it look like this wasintentional, but if so it was based on a faulty reading of what inheritancedoes: the parent tables can add an OID column, but they can't subtract one.AFAICS, the behavior ought to be that you get an OID column if any of theinherited tables, LIKE tables, or WITH clause ask for one.Also, revert that patch's unnecessary split of transformCreateStmt's loopover the tableElts list into two passes. That seems to have been based ona misunderstanding as well: we already have two-pass processing here,we don't need three passes.Per bug #14474 from Jeff Dafoe. Back-patch to 9.6 where the misbehaviorwas introduced.Report:https://postgr.es/m/20161222145304.25620.47445@wrigleys.postgresql.org1 parent22434dd commit1ead020
File tree
3 files changed
+30
-36
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+30
-36
lines changedLines changed: 18 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
65 | 64 |
| |
66 | 65 |
| |
67 | 66 |
| |
| |||
278 | 277 |
| |
279 | 278 |
| |
280 | 279 |
| |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
| 280 | + | |
285 | 281 |
| |
286 | 282 |
| |
287 | 283 |
| |
| |||
293 | 289 |
| |
294 | 290 |
| |
295 | 291 |
| |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 |
| - | |
| 292 | + | |
| 293 | + | |
303 | 294 |
| |
304 | 295 |
| |
305 |
| - | |
306 |
| - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
307 | 299 |
| |
308 | 300 |
| |
309 | 301 |
| |
| |||
313 | 305 |
| |
314 | 306 |
| |
315 | 307 |
| |
316 |
| - | |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
324 |
| - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
325 | 318 |
| |
326 |
| - | |
| 319 | + | |
327 | 320 |
| |
328 |
| - | |
329 |
| - | |
330 |
| - | |
331 |
| - | |
332 |
| - | |
333 |
| - | |
334 |
| - | |
335 |
| - | |
336 |
| - | |
337 | 321 |
| |
338 | 322 |
| |
339 | 323 |
| |
| |||
975 | 959 |
| |
976 | 960 |
| |
977 | 961 |
| |
978 |
| - | |
| 962 | + | |
979 | 963 |
| |
980 | 964 |
| |
981 | 965 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
257 |
| - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + |
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
134 |
| - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + |
0 commit comments
Comments
(0)