Skip to content

Tables created in the wrong database #1850

Answered by rkhaotix
dekiesel asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dekiesel

The .sql file is created in the way pgModeler runs the commands internally. Having said that, if you want to run the script as-is and create the objects correctly, use the export tool either in GUI or CLI (pgmodeler-cli).

If you want to run the script manually (for example, via psql) , you have to edit the file and put a \c [database] after the line that creates and sets the permissions over the new database so the PostgreSQL client can connect to the correct database and run the rest of commands. The way you are doing is another alternative to workaround this issue. Anyway, I can try to add an instruction in the generated file so you don't need to keep adding the \c every time.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dekiesel
Comment options

Answer selected by dekiesel
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