|
|
|
JOIN не присоединяет добавленную запись в этом же запросе
|
|||
|---|---|---|---|
|
#18+
Всем привет! Пытаюсь в одном запросе добавить запись в таблицу и вычитать эту добавленную запись. Запись добавляется, но новую запись JOIN не подцепляет. Код: sql 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Подскажите, пожалуйста, чем объясняется такое поведение пг (что почитать)? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.02.2016, 12:09 |
|
||
|
JOIN не присоединяет добавленную запись в этом же запросе
|
|||
|---|---|---|---|
|
#18+
keep calm and love pg, http://www.postgresql.org/docs/current/static/queries-with.html All the statements are executed with the same snapshot (see Chapter 13), so they cannot "see" one another's effects on the target tables. This alleviates the effects of the unpredictability of the actual order of row updates, and means that RETURNING data is the only way to communicate changes between different WITH sub-statements and the main query. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.02.2016, 12:22 |
|
||
|
|

start [/forum/topic.php?fid=53&msg=39181219&tid=1997398]: |
0ms |
get settings: |
10ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
163ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
37ms |
get tp. blocked users: |
1ms |
| others: | 233ms |
| total: | 480ms |

| 0 / 0 |
