Re: dynamic crosstab

Поиск
Список
Период
Сортировка
От Erik Jones
Тема Re: dynamic crosstab
Дата
Msg-id 79DE5E3E-36C1-45EC-9FAB-C44784CA81CA@myemma.com
обсуждение исходный текст
Ответ на Re: dynamic crosstab  (Joe Conway <mail@joeconway.com>)
Список pgsql-general
On Feb 14, 2008, at 8:19 PM, Joe Conway wrote:

> Erik Jones wrote:
>> See how postgres handles filling the NULLs for you?  What you'd
>> really want to do with this would be to define some functions for
>> setting and getting a person's answers to a given question or set
>> of questions so that you could implement some kind of data
>> integrity with regards to question ids and indices into the
>> answers arrays such as in the example above you'd want to prevent
>> an entry at index 7 when there is no entry in the questions table
>> for question_id=7.
>
> It occurs to me that it shouldn't be terribly difficult to make an
> alternate version of crosstab() that returns an array rather than
> tuples (back when crosstab() was first written, Postgres didn't
> support NULL array elements). Is this worth considering for 8.4?

That's a great idea.  At the very least someone (you? me?) could
start work on it and if it doesn't go into the main contrib package
it could be made available on pgfoundry.

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com




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

Предыдущее
От: Balázs Klein
Дата:
Сообщение: Re: dynamic crosstab
Следующее
От: Balázs Klein
Дата:
Сообщение: Re: dynamic crosstab