Re: preliminary: logical column order

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: preliminary: logical column order
Дата
Msg-id 10406.1069402859@sss.pgh.pa.us
обсуждение исходный текст
Ответ на preliminary: logical column order  (Neil Conway <neilc@samurai.com>)
Ответы Re: preliminary: logical column order  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.com> writes:
>         - The code for actually sorting the columns in attpos-order is
>           duplicated a few times -- this was just done for the sake of
>           convenience, I'm going to clean this up and stick it in a
>           single, shared location in the new patch.

Bruce and I were chatting about that on the phone today.  I think it
might be useful for TupleDescs to doubly index their contained attribute
rows --- that is, keep the existing array-indexed-by-attnum, but add
another pointer array indexed by attpos, containing only nondeleted
columns.  This would be easy to build, and it'd eliminate
searching/sorting for places that had access to a TupleDesc.

>         - When processing a "SELECT *", for example, the actual data
>           columns are returned in the right order, but the
>           RowDescription messages sent by libpq are not (i.e. they are
>           sent in attnum-order, not attpos).

Easy to fix given above proposal ... although actually I am not sure why
this would occur.  printtup and friends should always get a constructed
TupDesc that has no notion of deleted or renumbered columns.  This may
be a symptom of a more fundamental error somewhere.

            regards, tom lane

В списке pgsql-patches по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: preliminary: logical column order
Следующее
От: Jason Tishler
Дата:
Сообщение: YA Cygwin DLLIMPORT patch