Re: Is this doable using Postgresql crosstab or some other function?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Is this doable using Postgresql crosstab or some other function?
Дата
Msg-id CAHyXU0x__sxwseSmrndk+ZgMN6=-3hm8bD3MqLyYkSF3iAjtEg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is this doable using Postgresql crosstab or some other function?  (Mika M Lehtonen <mika@digikartta.net>)
Ответы Re: Is this doable using Postgresql crosstab or some other function?
Список pgsql-general
On Tue, Apr 10, 2012 at 9:31 AM, Mika M Lehtonen <mika@digikartta.net> wrote:
> Merlin,
> thanks for your reply. Semidoable? Let's break this into parts:
> 1) Is it possible to create a view which have dynamic number of colums based
> on the select response?

Mostly no.  A hardwired restriction is that a view has a rigidly
defined list of columns with defined types.  You can skirt that
restriction a couple of ways -- for example your view could be a
single column text (or xml, or hstore) with the columns you want
encoded into it.

> 2) Is it possible to name view colums based on some data retrieved with
> select statement?

nope -- in fact the point of views is to create a well defined
representation of something which is the opposite of what you are
trying to do.

> My pseudo definition, which was already simplified, could be simlified more.
> Maybe I do that and try crosstab for starters. As I told John, this model is
> one that works fine in one large application using MS SQL-Server. This view
> I am trying to create, is something that the application mentioned doesn't
> include. The model itself has been proven to be all working and extremely
> dynamical.
>
> This is what I discussed with John outside the list, forgive me, I didn't
> notice that, neither did John I guess..

merlin

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

Предыдущее
От: Mika M Lehtonen
Дата:
Сообщение: Re: Is this doable using Postgresql crosstab or some other function?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Is this doable using Postgresql crosstab or some other function?