python / pythondotorg

Source code for python.org
https://www.python.org
Apache License 2.0
1.47k stars 587 forks source link

Get data from PostgreSQL Database from table with : in name #2427

Closed Oleg-Savinkov closed 3 months ago

Oleg-Savinkov commented 3 months ago

Hello! I'm a beginner in Python. I'm trying to get data from a PostgreSQL database. Here is a query in Python

postgreSQL_select_Query = 'select * from ''abbott:Account" limit 100 '

I note that the table is called "abbott:Account", and I get the data with this particular request from DBeaver, everything is fine. But in Python I get a syntax error related to :. I could not solve the problem by any means. Tell me, how can I generate such a query in Python?

hugovk commented 3 months ago

This is the issue tracker for the actual website at https://www.python.org/.

You're better off asking at one of these places:

Oleg-Savinkov commented 3 months ago

Thanks! Sorry!

hugovk commented 3 months ago

Please will you also close this issue? Thank you!

Oleg-Savinkov commented 3 months ago

The question has been moved to another branch