Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEnsure we are resilient across PG versions #695
Comments
added a commit
that referenced
this issue
Feb 13, 2017
added a commit
that referenced
this issue
Feb 14, 2017
killercup
added
the
postgres
label
Feb 17, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedFeb 13, 2017
We currently always use the binary format for PG. However, the only type which explicitly documents its binary format is integer types, which is simply documented as using network byte order. For all other types we literally have to read the PG source code to find the binary representations. This appears to have been reasonably stable for at least the last couple versions, but we shouldn't assume that will always be the case. In fact the documentation explicitly states:
I do want to continue using binary whenever possible. For some types, the difference in performance is several orders of magnitude in terms of the work being done to handle the binary form vs what we'd have to do to parse the text form. However, we should at minimum do the following: