I have created some tables using python script using sqlalchemy in the DB postgres. when I log into db using shell for that uname:password combination and execute command to show tables \dt it gives me following output
Schema | Name | Type | Owner
--------+------------------+-------+----------------
public | CLASS_DESCRIPTOR | table | prefix_manager
public | test | table | prefix_manager
public | user | table | prefix_manager
public | user_prefs | table | prefix_manager
(6 rows)
The tables test was created using normal python script, and user,user_prefs were created using simple sqlalchemy code given below,
from sqlalchemy import *
engine = create_engine('postgresql://prefix_manager:password1@localhost:5432/prefix_manager')
metadata = MetaData()
user = Table('user', metadata,
Column('user_id', Integer, primary_key = True),
Column('user_name', String(16), nullable = False),
Column('email_address', String(60), key='email'),
Column('password', String(20), nullable = False)
)
user_prefs = Table('user_prefs', metadata,
Column('pref_id', Integer, primary_key=True),
Column('user_id', Integer, ForeignKey("user.user_id"), nullable=False),
Column('pref_name', String(40), nullable=False),
Column('pref_value', String(100))
)
metadata.create_all(engine)
But the table CLASS_DESCRIPTOR was created by another python script with sqlalchemy.
So when I do SELECT * from CLASS_DESCRIPTOR
it gives me following error
ERROR: relation "class_descriptor" does not exist.