On Mon, May 29, 2023 at 6:16 PM vignesh C <vignesh21@gmail.com> wrote:
>
> >
> > I found few comments while making some changes to the patch:
> > 1) Now that objtree is removed, these comments should be modified:
> > * Deparse object tree is created by using:
> > * a) new_objtree("know contents") where the complete tree content is known or
> > * the initial tree content is known.
> > * b) new_objtree("") for the syntax where the object tree will be derived
> > * based on some conditional checks.
> > * c) new_objtree_VA where the complete tree can be derived using some fixed
> > * content or by using the initial tree content along with some variable
> > * arguments.
> > *
>
> Modified
>
> > 2) isgrant can be removed as it is not used anymore:
> > +/*
> > + * Return the given object type as a string.
> > + *
> > + * If isgrant is true, then this function is called while deparsing GRANT
> > + * statement and some object names are replaced.
> > + */
> > +const char *
> > +stringify_objtype(ObjectType objtype, bool isgrant)
> > +{
> > + switch (objtype)
> > + {
> > + case OBJECT_TABLE:
> > + return "TABLE";
> > + default:
> > + elog(ERROR, "unsupported object type %d", objtype);
> > + }
> > +
> > + return "???"; /* keep compiler quiet */
> > +}
>
> Modified
>
> > 3) This statement is not being handled currently, it should be implemented:
> > "alter table all in tablespace tbs1 set tablespace"
>
> Modified
>
With the above fix, are the below commented tests in alter_table.sql
supposed to work? If so, shall these be uncommented?
-- ALTER TABLE ALL IN TABLESPACE pg_default SET TABLESPACE pg_default;
-- ALTER TABLE ALL IN TABLESPACE pg_default OWNED BY ddl_testing_role
SET TABLESPACE pg_default;
thanks
Shveta