In Cubrid Database Server there is a possibility to store the 'object instance' reference of newly inserted record into a local variable for referencing later in another statement, such as below:
create class atype (code integer, description varchar);
insert into atype (code,description) values (1,'Valid') into :valid_value;
create class tvalue (ttype atype, dvalue varchar);
insert into tvalue (ttype,dvalue) values (:valid_value, '1' ) into :a1 ;
Is this possible in PostgreSQL from within the same session? If so, is there a limit for the number of variables that are available?