Hello!
I'd like to be able to do something sort of analogous to this:
create table t (
x integer not null generated always as identity,
y integer not null
);
insert into t (y) values (t.x * 2);
In the real project, the "t.x * 2" expression is obviously something
a lot more complex, but I think it illustrates the point: I'd like to
be able to refer to the generated value of a column within the INSERT
statement that's going to cause it to be generated. Is there a way to
do this with a single statement right now?
I can think of various ways to do it with multiple statements, but a
single statement would be preferable.
--
Mark Raynsford | https://www.io7m.com