Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 10, 2012 at 9:31 AM, Mika M Lehtonen <mika@xxxxxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux