Questions about django3.05 and postgresql

The database uses postgresql10.12, (WINDOWS7 environment)
Use django3.05 + python3.7 + psycopg2 2.84 + pycharm to create a project: mysit5_305, create an application under the project: Article


image 1(Because there can only be one picture, this picture contains all the pictures)

image 2

Modify the database section in settings.py as follows:
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.postgresql’,
‘NAME’: ‘mysit’,
‘HOST’: ‘localhost’,
‘PROT’: ‘5432’,
‘USER’: ‘postgres’,
‘PASSWORD’: ‘abc123’,
}
}
Add the application “Article” in setting.py

Create a database in postgresql: mysit

image 3
Modify Models.py in the application Article as follows:
class Article (models.Model):
t = models.CharField (max_length = 50)
c = models.TextField ()

Perform makemigrations and migrate

Article_article will be generated in postgresql

After we perform a select operation, we find that the table does not exist, but from the visual list we find that the table exists

image 4
After we register this model in the application’s admin.py and open it in the foreground to add data, we found that it can be added

image 5

image 6 database visual interface
The added data can also be found in the database visual interface
But through the statement: select * from Article_article; but an error:
ERROR: relation “article_article” does not exist

image 7
Is there something wrong with this Article_article? Can only be accessed through django?
Why does django3.05 create a postgresql table only django can read and write, there will be problems through SQL statements? Is this a django3.05 bug for postgresql?
But I do: select * from auth_user; can be queried

image 8
I also found an interesting situation: I can also create a table with the same name in the database visual interface. It is said that the postgresql table name is not case sensitive, and the table with the same name cannot be created.

image 9

I don’t think Django has any bugs here.

I think to select from the table in your database software, you need to quote the table name with double quotes: SELECT * FROM "Article_article", so that PostgreSQL doesn’t convert it to lower case automatically.

I would recommend though that you rename your app to use lowercase characters only in its name. Python modules are best in lowercase because file systems, like databases, have mixed behaviour with case handling. PEP8, the Python style guide, recommends this: https://www.python.org/dev/peps/pep-0008/ .

Hi, thank you for your help, it is indeed the case, I just tested it, and double quotes around the table name can indeed be queried with SELECT.
I checked the information. PostgreSQL is not case sensitive in SQL statements, but in fact PostgreSQL is case sensitive for table names and column names.
Thanks again for your help!