Re: Can I simplify this somehow? - Mailing list pgsql-sql

From Sergey Konoplev
Subject Re: Can I simplify this somehow?
Date
Msg-id CAL_0b1uE8sUaKSqXra+3Wthdnkm5iJRJYC3e2pQ9xPC3SBoqhA@mail.gmail.com
Whole thread Raw
In response to Re: Can I simplify this somehow?  (Larry Rosenman <ler@lerctr.org>)
List pgsql-sql
On Fri, Sep 27, 2013 at 12:32 PM, Larry Rosenman <ler@lerctr.org> wrote:
> On 2013-09-27 14:24, Adam Jelinek wrote:
>> TIME  MON   TUE  WED ...
>> 09:00     1        3       4
>> 10:00     5        0       8
>>
> That would be cool, but just a list is good too.....

You need to take a look at this module:

http://www.postgresql.org/docs/9.3/static/tablefunc.html

Particularly look at the crostab(text, text) function.

-- 
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com



pgsql-sql by date:

Previous
From: jonathansfl
Date:
Subject: Re: postgres subfunction return error
Next
From: hugh holston
Date:
Subject: openclinica