Skip to content
Commits on Nov 25, 2015
  1. @johto

    Also test prepared queries in TestEmptyResultSetColumns

    johto committed
    The original commit from Tamir Duberstein also tested that code path,
    but I missed that while hacking on the test case a bit.
Commits on Aug 5, 2015
  1. @johto
Commits on Jul 23, 2015
  1. @johto

    Document that readBuf.int16() is unsigned

    johto committed
    It might make sense to rename it to uint16, but seeing that we're never
    interested in signed 16-bit integers, it seems unnecessary.
  2. @johto
Commits on Jul 1, 2015
  1. @johto

    Also send prepared statements' parameters over in binary

    johto committed
    .. if binary_parameters is set.  This should mean that both for a direct
    Query and a Prepare + Query the parameters get the same treatment.
    Though there's probably not much to gain in the latter case, it's better
    for consistency.
  2. @johto
  3. @johto

    Implement driver option binary_parameters

    johto committed
    If set, all parameters of type []byte will be sent over as binary data,
    which allows the driver to avoid the second round-trip to the server
    when not using a prepared statement proper.  This also allows pgbouncer
    to be used with parameterized queries, which is impossible if
    binary_parameters has not been enabled.
    This patch is still missing documentation, but the code has been sitting
    on my hard drive for long enough.  I'll commit the docs in a followup
    Marko Tiikkaja, with some help from Chris Gilling
Commits on Jun 30, 2015
  1. @johto

    Smallish extended query logic refactoring

    johto committed
    This is preparatory work for the binary_parameters patch, which needs to
    reuse parts of this logic.
  2. @johto
Commits on May 30, 2015
  1. @johto

    Use rowFmtDataAllText if there are no result columns

    johto committed
    This results in a result-less statement's execution requiring us to send
    two fewer bytes over.
  2. @johto

    Transparently receive parameters in binary format when possible

    johto committed
    When preparing a statement for repeated execution (as opposed to just
    parameterizing a single query using the unnamed statement) we get to
    know the types of the resulting columns before we have to decide which
    ones to receive in binary and which ones in text.  We can use that to
    our advantage to transparently avoid unnecessary binary -> text ->
    binary conversions.
    This has been shown in some cases to provide massive performance
    benefits, with little to no penalty even in the pathological case.  But
    just to err on the safe side, an option for disabling this feature is
    provided, disable_prepared_binary_result.  It is not documented in the
    user-facing documentation since its use is expected to be practically
    In the current state of affairs, only bytea and int8/int4/int2 values are
    requested in binary from the server.  Floats and time-related types are
    probably the next types to get the same treatment.
    Chris Bandy and Marko Tiikkaja
Commits on May 29, 2015
  1. @johto

    Decouple rows and stmt

    johto committed
    We need the ability to return rows objects which don't have an
    underlying prepared statement in order to support the single round-trip
  2. @johto

    Refactor writeBuf

    johto committed
    This change allows a single writeBuf to be used for sending multiple
    messages over in a single write operation.  This can lead to fewer
    allocations and system calls.
Commits on May 2, 2015
  1. @johto

    Fix bugs in errRecoverNoErrBadConn

    johto committed
    Last-minute changes to commits without running go test.. tsk tsk.
  2. @johto

    ListenerConn: Improve implementation of Close

    johto committed
    The previous coding was both unsafe (since it tried to operate on the
    connection without holding senderLock), but also in some cases failed to
    wake up ongoing queries.
  3. @johto

    ListenerConn: Report better errors from sendSimpleQuery

    johto committed
    ErrBadConns here are completely useless, since there's no database/sql
    to talk to.
  4. @johto

    ListenerConn: Return l.err instead of EOF on query failure

    johto committed
    While io.EOF is not the worst choice here, it can be a bit misleading.
    Fix by providing the accurate error (which should always be set at this
  5. @johto

    Add call to Gosched to the deadlock test case

    johto committed
    This should make it more likely that the pg_sleep() query is executed
  6. @johto

    ListenerConn: Fix deadlock when connection is lost while a query is q…

    johto committed
    Because the two goroutines acquire the two exclusive locks in different
    orders, they would deadlock with each other for no reason.  Fix by
    swapping the order of acquisition in acquireSenderLock.  If l.err is set
    nobody should be holding senderLock for a long time anyway, so undesired
    practical effects of this change should be very minimal.
Commits on May 1, 2015
  1. @johto

    Fix copy test failure in postgres HEAD

    johto committed
    Commit 4fe384bd858671d40d311ca68cc9b80f4c683a3e changed the way this
    works on postgres side, which sometimes caused this test to fail.
Commits on Apr 12, 2015
  1. @johto

    Clean up the defaulting code in openTestConnConninfo

    johto committed
    Spotted some room for improvement while working on
  2. @johto

    Default to instead of localhost in Travis

    johto committed
    It looks like looking up "localhost" can sometimes take more than four
    seconds in Travis, which makes tests with connection timeouts fail
    sporadically.  Try and fix that by avoiding the lookup by using the IP
Commits on Apr 11, 2015
  1. @johto
Commits on Apr 2, 2015
  1. @johto

    Disable SSL when connecting over a UNIX domain socket

    johto committed
    Previously if sslmode was not explicitly disabled, trying to connect
    over a UNIX domain socket would result in a "pq: SSL is not enabled on
    the server" error.  This is both silly and incompatible with libpq.  Fix
    by setting "sslmode" to "disable" automatically whenever a connection is
    made over a UNIX socket.
Commits on Mar 16, 2015
  1. @johto

    Revert "Temporarily disable TestSSLClientCertificates on 9.4 and above"

    johto committed
    The problem should be fixed upstream after commit ebe3d693d472f69c.
    This reverts commit f7ea31d.
Commits on Feb 19, 2015
  1. @johto
Commits on Feb 17, 2015
  1. @johto
Commits on Feb 9, 2015
  1. @johto

    Fix corner cases in Rollback and Commit

    johto committed
    In the unlikely event that the server somehow fails to roll back or
    commit a transaction and returns an "in transaction" flag in the
    ReadyForQuery packet, we should discard the connection.
Commits on Feb 5, 2015
  1. @johto
Commits on Jan 22, 2015
  1. @johto

    Panic if expectEvent times out

    johto committed
    For some reason this only fails in Travis.  Let's try and get more
    information about what's going on.
  2. @johto

    Fix inconsistencies in import formatting

    johto committed
    Per investigation after a note from Chris Bandy on commit
Commits on Jan 21, 2015
  1. @johto

    Add comment

    johto committed
    Forgot to add this in my previous commit.
  2. @johto

    Fix bug with B.C. timestamps and sub-hour UTC offsets

    johto committed
    The previous coding would output invalid timestamp formats such as
    "0001-02-03T04:05:06-07:30  BC:09".
    TruongSinh Tran-Nguyen, with small changes by Eric Urban and myself.
  3. @johto
Commits on Jan 9, 2015
  1. @johto


    johto committed
Something went wrong with that request. Please try again.