Re: logical column ordering
От | Peter Eisentraut |
---|---|
Тема | Re: logical column ordering |
Дата | |
Msg-id | 5500E827.5000209@gmx.net обсуждение исходный текст |
Ответ на | logical column ordering (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: logical column ordering
|
Список | 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.
В списке pgsql-hackers по дате отправления: