T
T
TemaKam2021-02-24 11:36:28
MySQL
TemaKam, 2021-02-24 11:36:28

Is it possible to work with PostgreSQL using the pymysql library?

Is it possible to work with PostgreSQL using the pymysql library?
That is, so that I can connect to both the mysql database and the PostgreSQL database

. And if not, what is the universal way to connect to any database?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2021-02-24
@bacon

The universal way is to use an ORM (but it still requires libraries). Another option, from one database, will connect to another, if there is such an opportunity, an example of mysql_fdw for PostgreSQL. But the easiest way is to put your own library for each base and not be perverted.

D
Dmitry, 2021-02-24
@dmtrrr

1) not possible
2) there is no such way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question