| От | Tom Lane |
|---|---|
| Тема | Re: RETURNING clause: how to specifiy column indexes? |
| Дата | |
| Msg-id | 13400.1197442863@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: RETURNING clause: how to specifiy column indexes? (Kris Jurka <books@ejurka.com>) |
| Ответы |
Re: RETURNING clause: how to specifiy column indexes?
|
| Список | pgsql-general |
Kris Jurka <books@ejurka.com> writes:
> I think the expectation is that:
> CREATE TABLE t(a int, b int);
> INSERT INTO t(b,a) VALUES (1,2) RETURNING *;
> will return 1,2 instead of 2,1 as it does now.
Hmm ... I see your point, but on what grounds could one argue that
a "*" targetlist here should return something different from what
"SELECT * FROM t" would return?
I'd say that an app that wants that should write
INSERT INTO t(b,a) VALUES (1,2) RETURNING b,a;
which is surely not that hard if you've got the code to produce
the "(b,a)" part.
In any case it's not clear this is the same thing Ken is complaining
about ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера