Skip to content

Is it possible to generate without schema at hand? #1551

Answered by skabbes
orkhanrustamli asked this question in Q&A
Discussion options

You must be logged in to vote

Without the schema information, sqlc cannot know what types each columns is - and therefore it is (basically) impossible to know which data types to use.

What I have done in the past for this is to just issue a pg_dump - assuming you have permissions to do so.

pg_dump --no-privileges --no-acl --no-owner --schema-only --no-comments --encoding=utf8 postgres://your_db_here

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by orkhanrustamli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants