Skip to content

Binary protocolΒ #232

@uasan

Description

@uasan

I know the @porsager is interested in supporting the binary protocol, so I created this thread.

There are several advantages to a binary protocol:

  1. Binary protocol, gives better typing to nested structures, arrays and records inside store oid types of elements, you do not need to parse a string
  2. Less bytes for some data types, for example, uuid - 16 bytes instead of 36 in text form, timestamp - 8 bytes instead of 24 in text form
  3. Better performance, because postgres gives data in the form in which it is stored
  4. Zero cost for bytea type

I advise you to study the experience of other clients

C# client: npgsql/npgsql#447
Description binary struct by type: https://github.com/npgsql/doc/blob/main/dev/types.md/#L1

I also develop a client on node.js, later I can lay out a draft version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions