Skip to content

Declared Local Temporary Tables in PSQL#9058

Open
asfernandes wants to merge 2 commits into
masterfrom
work/ltt
Open

Declared Local Temporary Tables in PSQL#9058
asfernandes wants to merge 2 commits into
masterfrom
work/ltt

Conversation

@asfernandes

Copy link
Copy Markdown
Member

No description provided.

@AlexBekhtin

Copy link
Copy Markdown

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!

@asfernandes

Copy link
Copy Markdown
Member Author

Is infinite execution correct by design?

No, current local table blr (as used for RETURNING) is fragile.
I'm reviewing the implementation details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants