cweijan / vscode-database-client

Database Client For Visual Studio Code
https://database-client.com
MIT License
2.46k stars 280 forks source link

Show Table DDL - Show definition of generated columns #1164

Closed onwardmk closed 3 months ago

onwardmk commented 4 months ago

Thank you for this excellent extension.

When I select Show Table DDL for a table that has a PostgreSQL generated column, the definition only specifies the expression result type instead of the entire expression.

Actual:

example_generated_column text

Desired:

example_generated_column text COLLATE pg_catalog."default" GENERATED ALWAYS AS (
CASE
    WHEN (another_column IS NOT NULL) THEN 'foo'::text
    ELSE 'bar'::text
END) STORED
cweijan commented 3 months ago

Suported in version 7.4.4.