Open p-null opened 4 years ago
The purpose of this function( get_server_version
) is to get the version of PostgreSQL server originally. It will let asyncpg choose the appropriate driver to connect with PostgreSQL server.
So here I think the purpose is to get YugabyteDB's PosrgreSQL version, like which version of PostgreSQL that YB is using.
Within '11.2-YB-2.2.0.0-b0', the 11.2 is the corresponding Postgres version.
See related blog post: 1M rows/s from Postgres to Python
Hey there. Something up to date on this thread, I'm having the same issue with Yugabyte running on a kubernetes cluster, would I define it something like this?
conn = await asyncpg.connect(user='1234',
password='1234',
database='1234',
host='1234,
port=1234)
conn = conn.get_server_version()```
Have you any fix?
I kinda figured out the issue when I rebuilt the wheel after editing serverversion.py
Jira Link: DB-1359 Hi,
I am using asyncpg as database driver for my python application.
Currently, it will break on
split_server_version_string()
in asyncpg library: inside that function it will getversion_string
, and convert each part of that string toint
. While YugabyteDB returns theversion_string
containing strings that cant be converted toint
. In my case, it's '11.2-YB-2.2.0.0-b0'A minimum example to reproduce: