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

can't support create database for pg12.06 #343

Closed
xiaods opened this issue Jan 10, 2022 · 6 comments · Fixed by #344
Closed

can't support create database for pg12.06 #343

xiaods opened this issue Jan 10, 2022 · 6 comments · Fixed by #344
Assignees
Labels
bug Something isn't working

Comments

@xiaods
Copy link

xiaods commented Jan 10, 2022

Provide the MySQL version you are using (if related with instance/database operation)

Provide the GitLab version you are using (if related with VCS integration)

Provide the Bytebase version you are using

The version info is shown on the bottom left of the console.

Describe the bug

A clear and concise description of what the bug is.

Steps or screenshots to reproduce the behavior

  1. Go to 'database'
  2. Click on 'create database'
  3. See error

Image_20220110112336

If the error is not obvious, you can enable the --debug option on startup and attach the console message here

Expected behavior

A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

@xiaods xiaods added the bug Something isn't working label Jan 10, 2022
@spinningbot
Copy link
Contributor

It looks like you have some views without definitions for some reasons. We're providing a fix to exclude views with NULL view definition from schema dumps.

https://www.postgresql.org/docs/12/sql-createview.html

@xiaods
Copy link
Author

xiaods commented Jan 10, 2022

thanks for your patch

@spinningbot
Copy link
Contributor

Hi xiaods@, did you also grant bytebase enough permission to get all the views? I was thinking how we get to a spot with empty view definition which is almost required.

There are some instructions on adding an instance.
"Below is an example to create user 'bytebase' with password YOUR_DB_PWD and grant the user with the needed privileges. If the connecting instance is self-hosted, then you can grant SUPERUSER."

@xiaods
Copy link
Author

xiaods commented Jan 10, 2022

Hi xiaods@, did you also grant bytebase enough permission to get all the views? I was thinking how we get to a spot with empty view definition which is almost required.

There are some instructions on adding an instance. "Below is an example to create user 'bytebase' with password YOUR_DB_PWD and grant the user with the needed privileges. If the connecting instance is self-hosted, then you can grant SUPERUSER."

I use a normal user without superuser permission. let me double check it.

@xiaods xiaods closed this as completed Jan 10, 2022
@spinningbot
Copy link
Contributor

Hi xiaods@, would you mind sharing us the story for closing the bug? Just curious and wanna learn something. Thanks!

@xiaods
Copy link
Author

xiaods commented Jan 11, 2022

Hi xiaods@, would you mind sharing us the story for closing the bug? Just curious and wanna learn something. Thanks!

As you designed it, this SQL editor is for querying SQL and not for managing DML. As I am new to SQL editor, I did not know the process, so I executed the wrong SQL directly inside SQL editor to report an error. After your reminder, I have known the process. I have used the DML language in Alter Schema and it works fine, so I closed the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants