| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Phil Currier <pcurrier(at)gmail(dot)com> |
| Subject: | Re: logical column ordering |
| Date: | 2015-03-12 01:13:11 |
| Message-ID: | 5500E827.5000209@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 12/9/14 12:41 PM, Alvaro Herrera wrote:
> To recap, this is based on the idea of having three numbers for each
> attribute rather than a single attnum; the first of these is attnum (a
> number that uniquely identifies an attribute since its inception and may
> or may not have any relationship to its storage position and the place
> it expands to through user interaction). The second is attphysnum,
> which indicates where it is stored in the physical structure. The third
> is attlognum, which indicates where it expands in "*", where must its
> values be placed in COPY or VALUES lists, etc --- the logical position
> as the user sees it.
Side idea: Let attnum be the logical number, introduce attphysnum as
the storage position, and add an oid to pg_attribute as the eternal
identifier.
That way you avoid breaking pretty much all user code that looks at
pg_attribute, which will probably do something like ORDER BY attnum.
Also, one could get rid of all sorts of ugly code that works around the
lack of an oid in pg_attribute, such as in the dependency tracking.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2015-03-12 01:13:59 | Re: Precedence of standard comparison operators |
| Previous Message | Peter Eisentraut | 2015-03-12 00:55:18 | Re: Turning off HOT/Cleanup sometimes |