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

Table context menu selection "Script as Create" does not include all table relevant settings (at least description comments) #492

Open
FrySlim opened this issue Dec 14, 2023 · 2 comments
Assignees

Comments

@FrySlim
Copy link

FrySlim commented Dec 14, 2023

I have a feature request:

When I do a "Script as Create" on a Postgres database table (ADS v1.47 with Postgres plugin v0.6.0), following statements are built:

  • CREATE TABLE
  • ALTER TABLE OWNER

In case a COMMENT was set on an table and/or a column, the following appropriate statements should additionally be built:

  • COMMENT ON COLUMN
  • COMMENT ON TABLE

Further more (just guessing that its also missing here):

  • current INDEX creations on that table
  • current CONSTRAINT creations on it

You can check the comment like this in Postgres:

-- check comment on table myschema."MyTable":
SELECT obj_description('myschema."MyTable"'::regclass);
-- check comment on column "MyColumn" on table myschema."MyTable":
SELECT col_description('myschema."MyTable"'::regclass::oid, (SELECT attnum FROM pg_attribute WHERE attrelid = 'myschema."MyTable"'::regclass AND attname = 'MyColumn'));

@GennadNY
Copy link
Collaborator

GennadNY commented Jan 8, 2024

@FrySlim - what PG version are you working with?

@GennadNY GennadNY assigned GennadNY and samir-puranik and unassigned GennadNY Jan 8, 2024
@FrySlim
Copy link
Author

FrySlim commented Jan 12, 2024

At least PG 11 and newer.

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