JSON(B) automatically marshals any value. Avoid marshalling values of
pgtype.JSON and pgtype.JSONB. The caller certainly meant to call on a
pointer.
See https://github.com/jackc/pgx/issues/350 for discussion.
refs #350
A batch on a tx object does not open and close a transaction itself and
instead use the tx object to ensure the transactionality of the batch
remove unused boolean 'sent' in batch struct
* wingedpig-master:
Reverted breaking API change to CreateReplicationSlot. Instead, the new version that returns the consistent_point and snapshot_name values is called CreateReplicationSlotEx().
Changed CreateReplicationSlot to return the consistent_point and snapshot_name.
* 'master' of https://github.com/wingedpig/pgx:
Reverted breaking API change to CreateReplicationSlot. Instead, the new version that returns the consistent_point and snapshot_name values is called CreateReplicationSlotEx().
Changed CreateReplicationSlot to return the consistent_point and snapshot_name.
An incompletely read select followed by an insert would fail. This was
caused by query methods in the non-batch path always calling
ensureConnectionReadyForQuery. This ensures that connections interrupted
by context cancellation are still usable. However, in the batch case
query methods are not being called while reading the result. A
incompletely read select followed by another select would not manifest
this error due to it starting by reading until row description. But when
an incomplete select (which even a successful QueryRow would be
considered) is followed by an Exec, the CommandComplete message from the
select would be considered as the response to the subsequent Exec.
The fix is the batch tracking whether a CommandComplete is pending and
reading it before advancing to the next result. This is similar in
principle to ensureConnectionReadyForQuery, just specific to Batch.
It's possible to define a type (e.g., an enum) with the same name in two
different schemas. When initializing data types after connecting, types
defined within schemas other than pg_catalog or public should be
qualified with their schema name to disambiguate them and ensure all
types with the same base name get added to the map of OID to type.
Prior to this commit, the last type scanned would "win", and all others
with the same name would be missing from the ConnInfo type maps, which
would subsequently cause any PREPARE involving columns of those missing
types to return the error "unknown oid".