From: | "Dmitry E(dot) Oboukhov" <unera(at)debian(dot)org> |
---|---|
To: | pgsql-ru-general(at)postgresql(dot)org |
Subject: | Select по двум массивам |
Date: | 2012-12-02 12:52:25 |
Message-ID: | 20121202125225.GA28032@vdsl.uvw.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-ru-general |
есть табличка
1, {1,2,3},{4,6,7},'text1'
2, {8,9,0},{11,23,22},'text2'
нужно сделать выбрку
1,1,4,'text1'
1,2,6,'text1'
1,3,7,'text1'
2,8,11,'text2'
2,9,23,'text2'
2,0,22,'text2'
select col1, unnest(col2), unnest(col3), col4 from table делает в
принципе то что надо, но непонятно будет ли работать это в последующих
версиях Pg :)
--
. ''`. Dmitry E. Oboukhov
: :’ : email: unera(at)debian(dot)org jabber://UNera(at)uvw(dot)ru
`. `~’ GPGKey: 1024D / F8E26537 2006-11-21
`- 1B23 D4F8 8EC0 D902 0555 E438 AB8C 00CF F8E2 6537
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitriy Igrishin | 2012-12-04 18:13:02 | Re: [pgsql-ru-general] Select по двум массивам |
Previous Message | Florent Guillaume | 2012-10-17 04:38:01 | Re: WebSphere Application Server support for postgres |