Re: Missing table from in INSERT RETURNING
От | David G Johnston |
---|---|
Тема | Re: Missing table from in INSERT RETURNING |
Дата | |
Msg-id | CAKFQuwbkrw3k3LSmPH8-GqmpdJuqR8057NC-b190eF42w0-EfA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Missing table from in INSERT RETURNING (John McKown <john.archie.mckown@gmail.com>) |
Ответы |
Re: Missing table from in INSERT RETURNING
|
Список | pgsql-general |
I haven't seen any one else reply. I don't know if you've gotten a solution. But the following seemed to work for me:
mine apparently got bounced...
WITH serie AS (select s, s*10 as computingfrom generate_series(1,10) as s)INSERT INTO test_insert_returning (some_value)SELECT computingFROM serieRETURNING gid, some_value;
or, "RETURNING some_value / 10"
From my reading on the RETURNING phrase, you can only return values from the table into which you are doing the INSERT. Not any other table or view which might be referenced.
This is correct; and I am curious on the use case that requires otherwise.
David J.
View this message in context: Re: Missing table from in INSERT RETURNING
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: