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

(psycopg2.OperationalError) FATAL: database "public" does not exist #1873

Closed
3 tasks done
witwall opened this issue Dec 21, 2016 · 14 comments
Closed
3 tasks done

(psycopg2.OperationalError) FATAL: database "public" does not exist #1873

witwall opened this issue Dec 21, 2016 · 14 comments
Labels
#bug:cant-reproduce Bugs that cannot be reproduced

Comments

@witwall
Copy link

witwall commented Dec 21, 2016

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.15.0

Expected results

Show the result of SQL

Actual results

(psycopg2.OperationalError) FATAL: database "public" does not exist

Steps to reproduce

access PostgreSQL through SQL Lab,

superset000

@xrmx
Copy link
Contributor

xrmx commented Dec 21, 2016

Does it work if you don't specify the schema?

@witwall
Copy link
Author

witwall commented Dec 21, 2016

@xrmx does not work, but preview works sometime

@mistercrunch
Copy link
Member

Does it work if you SELECT ... FROM activity instead of public.activity?

@witwall
Copy link
Author

witwall commented Dec 22, 2016

it works no matter

SELECT *
FROM public.vintage LIMIT 100

or

SELECT *
FROM vintage LIMIT 100

just if I did not select any schema from let panel.

superset001

@sanjayobla
Copy link

I can confirm that I'm facing the same issue. If I choose the schema explicitly in the left pane and try to query a table with either

SELECT * FROM <schema_name>.<table_name>
or
SELECT * FROM <table_name>
I get the error
(psycopg2.OperationalError) FATAL: database <schema_name> does not exist

If I don't choose the schema name from the drop down and try to do
SELECT * FROM <schema_name>.<table_name>, everything works fine.

@Pixelartist
Copy link

Hello,

+1 - I am having the same issue, running superset in docker.

@mistercrunch
Copy link
Member

Is there a full stacktrace from the server logs?

@mistercrunch
Copy link
Member

Most likely the issue is around confusion between the database and schema "namespacing" in Postgres. Databases have different semantics in that area on how they name these logical groups (database, schema, owner) and how many levels of them they have, and SQLAlchemy takes a bit of a common denominator approach.

@mistercrunch mistercrunch added #bug:cant-reproduce Bugs that cannot be reproduced help wanted labels Feb 10, 2017
@mistercrunch
Copy link
Member

Since we don't use Postgres at Airbnb I'd like for someone to step in and help fix this.

@huksley
Copy link

huksley commented Feb 18, 2017

I have similar problem. Can`t deselect schema.

@sungjuly
Copy link
Member

sungjuly commented Mar 1, 2017

It's same/duplicated issue with #1558, and my PR was merged the last couple of days. You can use that feature correctly in the next release.

@mistercrunch
Copy link
Member

0.17 is out!

@gustavodemari
Copy link

The problem continues on 0.17.3

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 381 days. Feel free to comment and request for this issue to be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug:cant-reproduce Bugs that cannot be reproduced
Projects
None yet
Development

No branches or pull requests

8 participants