Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When there is a declare content, the subType attribute of the temporary table is lost. (greenplum) #89

Open
wfh010624 opened this issue Nov 15, 2024 · 2 comments
Assignees

Comments

@wfh010624
Copy link

When the sql is as follows:

begin
 drop table if exists temp_goods;
    create temp table temp_goods as
    select
        substring(md5(g.gid::varchar),9,16) id,
        g.gid,g.code,g.code2,g."name",g.shortname,g.ename eng_name,
        g.eshortname eng_shortname,g.spec,g.munit qpc_unit,
        g.qpc,g.qpcstr qpc_desc,g.vol,g.tm trademark,g.brand
    from goods g;
end;

the response is:

data.sqlflow.dbobjs.servers[0].databases[0].schemas[0].tables[1]={
        displayName: "temp_goods",
	id: "4",
	name: "temp_goods",
	subType: "temp_table",
	type: "table"
}

When the sql is as follows:

declare 
    v_time date := current_date;
begin
 drop table if exists temp_goods;
    create temp table temp_goods as
    select
        substring(md5(g.gid::varchar),9,16) id,
        g.gid,g.code,g.code2,g."name",g.shortname,g.ename eng_name,
        g.eshortname eng_shortname,g.spec,g.munit qpc_unit,
        g.qpc,g.qpcstr qpc_desc,g.vol,g.tm trademark,g.brand
    from goods g;
end;

the response is:

data.sqlflow.dbobjs.servers[0].databases[0].schemas[0].tables[1]={
        displayName: "temp_goods",
	id: "4",
	name: "temp_goods",
	type: "table",
}

I need the subType attribute to determine whether the table is temporary

@wfh010624
Copy link
Author

image
image

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

No branches or pull requests

3 participants