Re: the wire protocol

From: Dmitry Igrishin <dmitigr(at)gmail(dot)com>
To: Catonano <catonano(at)gmail(dot)com>
Cc: pgsql-interfaces(at)lists(dot)postgresql(dot)org
Subject: Re: the wire protocol
Date: 2019-01-19 15:16:31
Message-ID: CAAfz9KPbpiQuXX1+=55aHoNBXrGnYYsWOKcci1f0Bh4eoN=TLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

сб, 19 янв. 2019 г. в 16:56, Catonano <catonano(at)gmail(dot)com>:
>
> Hello,
>
> there's this Python project using the so called wire protocol (as far as I understand)
>
> https://github.com/MagicStack/asyncpg
>
> I'm caressing the idea to create a GNU Guile based project that does the same thing
>
> But I don't understand how they manage to get the connection to Postgresql, their code is too complicated for me
>
> Do they use the C library, libpq ?
> Or do they manage the connection in their own code ?
AFAIK, asyncpg implements the frontend/backend protocol described here:
https://www.postgresql.org/docs/current/protocol.html

> Should I use libpq ?
Not necessary.

> Or should I manage the connection in my own code ?
You can implement the protocol yourself in pure Guile. It's up to you to decide.

> In Guile I can manipulate sockets and the semantics are pretty close to the ones of plain C
>
> So even an example in C would be fine
>
> I'd like to use a Unix socket
To do it, first of all you need to familiarize with the
frontend/backend protocol mentioned above.

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message John DeSoi 2019-01-22 03:25:26 Re: the wire protocol
Previous Message Catonano 2019-01-19 13:56:09 the wire protocol