Re: Splitting text column to multiple rows
| От | Pavel Stehule |
|---|---|
| Тема | Re: Splitting text column to multiple rows |
| Дата | |
| Msg-id | 162867791003290542v34afc0e4x950cd82ce94d8995@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Splitting text column to multiple rows ("Andrus" <kobruleht2@hot.ee>) |
| Список | pgsql-general |
2010/3/29 Andrus <kobruleht2@hot.ee>: >> no it is in same order. generate_series generates indexes from > > 1,2,3.... so result have to be exactly in same order. You do some > wrong. > > In my sample I used joind and projecton this changes order. > How to add order number 1,2,.. to created table ? > you cannot use join for this task you can use some trick - using a sequences http://www.postgresql.org/files/documentation/books/aw_pgsql/node75.html postgres=# create temp SEQUENCE xx; CREATE SEQUENCE Time: 3,496 ms postgres=# select nextval('xx'), * from gg; nextval | a | b ---------+----+---- 1 | 10 | 33 2 | 55 | 22 (2 rows) Time: 0,926 ms postgres=# select * from gg; a | b ----+---- 10 | 33 55 | 22 (2 rows) regards Pavel Stehule > Andrus. >
В списке pgsql-general по дате отправления: