Hi.
I'm having this schema:
create table foo( id integer PRIMARY KEY, name varchar not null ); insert into
foo(id,name) values(1, 'one'), (2, 'two'); insert into foo(id, name) select 3,
f.namefrom foo f where f.id = 1 returning id, f.id; ERROR: missing FROM-clause
entry for table "f" LINE 1: ...lect 3, f.name from foo f where f.id = 1
returning id, f.id;
I'd like to return f.id and the inserted id, is this possible?
I want this because I'm hoping to use this in a CTE where other selects from
this CTE will use this extra column.
Thanks.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>