Re: logical column ordering - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: logical column ordering
Date
Msg-id 54F0C906.5040404@2ndquadrant.com
Whole thread Raw
In response to Re: logical column ordering  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: logical column ordering  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: logical column ordering  (Arthur Silva <arthurprs@gmail.com>)
List pgsql-hackers
On 27.2.2015 20:34, Alvaro Herrera wrote:
> Tomas Vondra wrote:
> 
>> I think we could calls to the randomization functions into some of the
>> regression tests (say 'create_tables.sql'), but that makes regression
>> tests ... well, random, and I'm not convinced that's a good thing.
>>
>> Also, this makes regression tests harder to think, because "SELECT *"
>> does different things depending on the attlognum order.
> 
> No, that approach doesn't seem very useful.  Rather, randomize the
> columns in the CREATE TABLE statement, and then fix up the attlognums so
> that the SELECT * expansion is the same as it would be with the
> not-randomized CREATE TABLE.

Yes, that's a possible approach too - possibly a better one for
regression tests as it fixes the 'SELECT *' but it effectively uses
fixed 'attlognum' and 'attnum' values (it's difficult to randomize
those, as they may be referenced in other catalogs).

-- 
Tomas Vondra                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: logical column ordering
Next
From: Alvaro Herrera
Date:
Subject: Re: logical column ordering