Re: [GENERAL] Missing table from in INSERT RETURNING

2015-02-18 Thread Rémi Cura
Hey folks, thanks for the answers. As you guessed it is just a synthetic example, (so of course RETURNING some_value / 10 is possible in this case, but not in general when the function is much more complicated than "/10"). Same wise, adding a column is just not a serious option. It correspond to

Re: [GENERAL] Missing table from in INSERT RETURNING

2015-02-17 Thread John McKown
On Tue, Feb 17, 2015 at 2:15 PM, David G Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Feb 17, 2015 at 1:08 PM, John McKown [via PostgreSQL] <[hidden > email] > wrote: > >> I haven't seen any one else reply. I don't know if you've go

Re: [GENERAL] Missing table from in INSERT RETURNING

2015-02-17 Thread David G Johnston
On Tue, Feb 17, 2015 at 1:08 PM, John McKown [via PostgreSQL] < ml-node+s1045698n5838306...@n5.nabble.com> wrote: > 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 ( > se

Re: [GENERAL] Missing table from in INSERT RETURNING

2015-02-17 Thread John McKown
On Tue, Feb 17, 2015 at 2:07 PM, John McKown wrote: > 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: > > WITH serie AS ( > select s, s*10 as computing > from generate_series(1,10) as s > ) > INSERT INTO test_insert_returning

Re: [GENERAL] Missing table from in INSERT RETURNING

2015-02-17 Thread John McKown
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: WITH serie AS ( select s, s*10 as computing from generate_series(1,10) as s ) INSERT INTO test_insert_returning (some_value) SELECT computing FROM serie RETURNING gid, some_value;

[GENERAL] Missing table from in INSERT RETURNING

2015-02-17 Thread Rémi Cura
Hello dear list, I would appreciate some help on a small matter that has been bothering me for a long time : CREATE TABLE test_insert_returning( gid SERIAL ,some_value int ); WITH serie AS ( select s, s*10 as computing from generate_series(1,10) as s ) INSERT INTO test_insert_returning (some_valu