Declared Local Temporary Tables in PSQL#9058
Conversation
|
Is infinite execution correct by design? execute block returns (n integer)
as
declare local temporary table t (
id integer not null
);
begin
insert into t(id)
values(1);
insert into t(id)
select id from t;
select count(*) from t into n;
suspend;
end! |
No, current local table blr (as used for RETURNING) is fragile. |
|
Please add documentation about declared ltt restrictions, specifically the number of LTTs per operator. Could you add the ability to declare indexes for such tables? |
I'm working on it. Will be added in another PR. |
|
|
||
| const Format* format = rpb->rpb_relation->currentFormat(tdbb); | ||
| Record* record = VIO_record(tdbb, rpb, format, tdbb->getDefaultPool()); | ||
| const Format* format = relation ? rpb->rpb_relation->currentFormat(tdbb) : localTable->format.getObject(); |
There was a problem hiding this comment.
Please explain why relation may be missing here (and other similar methods)? This seems to seriously complicate the logic.
There was a problem hiding this comment.
Multi-row RETURNING uses an old implementation of "local table" based in RecordBuffer.
|
@dyemanov do you have any more things before this can be merged? |
No description provided.