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

'COMMENT ON COLUMN' does not work for attributes of custom types #3718

Open
varungandhi-src opened this issue Nov 22, 2024 · 0 comments
Open
Labels
📚 postgresql bug Something isn't working

Comments

@varungandhi-src
Copy link

Version

1.27.0

What happened?

sqlc does not recognize that a type created using CREATE TYPE allows comments on its attributes using COMMENT ON COLUMN.

This test also does not have coverage for this case.

https://sourcegraph.com/github.com/sqlc-dev/sqlc/-/blob/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/schema.sql

Relevant log output

# package db
query.sql:1:1: relation "abc" does not exist

Database schema

CREATE TYPE abc AS (
  x integer
);

COMMENT ON COLUMN abc.x IS 'hello';

SQL queries

n/a

Configuration

n/a

Playground URL

https://play.sqlc.dev/p/b753dfa2bcd9d8e6f836a8223b9b3d1dc665dccf2153f5fa71d5d00d7fcc1df5

What operating system are you using?

No response

What database engines are you using?

No response

What type of code are you generating?

No response

@varungandhi-src varungandhi-src added the bug Something isn't working label Nov 22, 2024
@varungandhi-src varungandhi-src changed the title 'COMMENT ON COLUMN' does not understand that 'CREATE TYPE' introduces a table 'COMMENT ON COLUMN' does not work for attributes of custom types Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 postgresql bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant