Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Amit Langote
On 2017/05/19 11:02, Peter Eisentraut wrote: > On 5/18/17 19:07, Thomas Munro wrote: >> To make normal dump/restore preserve the order, we could either make >> it *always* write create-then-attach, or do it only if required. I'd >> vote for doing it only if required because of different column ord

Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Peter Eisentraut
On 5/18/17 19:07, Thomas Munro wrote: > To make normal dump/restore preserve the order, we could either make > it *always* write create-then-attach, or do it only if required. I'd > vote for doing it only if required because of different column order, > because I don't want to see 1,000 partitions

Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 5/18/17 16:21, Thomas Munro wrote: > > That's because if you attach a partition with a different column > > ordering, > > Is it intentional and sensible to allow that in the first place? Or was > it just inherited from inheritance? I think it was deliberately allowed

Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Thomas Munro
On Fri, May 19, 2017 at 10:53 AM, Peter Eisentraut wrote: > On 5/18/17 16:21, Thomas Munro wrote: >> That's because if you attach a partition with a different column >> ordering, > > Is it intentional and sensible to allow that in the first place? Or was > it just inherited from inheritance? Can

Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Peter Eisentraut
On 5/18/17 16:21, Thomas Munro wrote: > That's because if you attach a partition with a different column > ordering, Is it intentional and sensible to allow that in the first place? Or was it just inherited from inheritance? > pg_dump dumps it with a normal CREATE TABLE ... PARTITION OF > ... co

Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Thomas Munro
On Fri, May 19, 2017 at 7:21 AM, Peter Eisentraut wrote: > But this is a bit more suspicious: > > Original: > > Table "public.mlparted11" > Column | Type | Collation | Nullable | Default > +-+---+--+- > b | integer | | not nu

Re: [HACKERS] different column orders in regression test database

2017-05-18 Thread Tom Lane
Peter Eisentraut writes: > When you dump out the regression test database and load it back in, a > few tables end up with different column orders: > ... > This table is part of a lengthy inheritance chain, so this might be > intentional or too hard to fix. This behavior goes back to 9.2 and > pos

[HACKERS] different column orders in regression test database

2017-05-18 Thread Peter Eisentraut
When you dump out the regression test database and load it back in, a few tables end up with different column orders: Original: Table "public.f_star" Column | Type | Collation | Nullable | Default +--+---+--+- class | charact