Repository navigation
v1.0.0-rc.16
Pre-releaseAdded
- Manual commit mode (#219) and the
manual_commitcapability: with
manual_commitonexecute_query/execute_query_batch, the plugin sends
BEGINbefore a session's first statement and keeps the connection pinned
until the newcommit_sessionorrollback_sessionRPC ends the
transaction.get_session_statereports whether a session holds one. A
connection whoseCOMMIT/ROLLBACKfailed is closed instead of returning to
the pool. Inert until the host sendsmanual_commit(tabularis#1752).
Changed
-
read_rowsreads every column that is not a native JSON type as the
server's own::textoutput instead of decoding PostgreSQL's binary format
in the plugin (#225, #227). Native types are unchanged:bool,
int2/int4/int8,oid,float4/float8(NaN/±Infinityas
strings),bytea(full base64),text/varchar/bpchar/name,uuid.
moneyreads as::numeric::text("123.45"). Contract changes:- arrays, ranges, multiranges and composites are PostgreSQL text strings
("{{1,2},{3,4}}","[2:3]={1,2}","(1,2)"), not JSON arrays or objects; timestamptzis read in UTC with a+00offset (was+00:00);intervalfollowsIntervalStyle = postgres(14 monthsreads
1 year 2 mons);json/jsonbis the server's exact text, so1e400, wide numbers and
jsonduplicate keys survive;- hstore reads as its text form (
"a"=>"1"), not a JSON object; - a zero-row result now reports its
columns.
The read pins
DateStyle,IntervalStyle,extra_float_digits,
bytea_outputandTimeZonewithSET LOCAL, so a connection's startup
script does not change the text. The binary lossless decoders (PgNumeric,
the full-precision temporal decoders,PgIntervalText,PgMoneyText, the
lossless array decoder) are removed. - arrays, ranges, multiranges and composites are PostgreSQL text strings
-
insert_records,insert_recordandupdate_recordcast a value that no
earlier binding step recognizes to the column's schema-qualified type
(CAST($N AS public.point2d)), so composites, arrays with lower bounds,
user-defined ranges and hstore text write back.jsonb[]arrays may
contain JSON objects (#225, #227).
Fixed
read_rows: multi-dimensional arrays, array lower bounds,1e400and
wide jsonb numbers,jsonduplicate keys,tstzrangeoffsets and
intervalnormalization now match the server (#225, #227). These were
silentnulls or changed values.read_rowsone-shot reads always end withROLLBACK, so a query that sets
a session setting (set_config(…, false)) can no longer leak it into the
pooled connection (#225).read_rowsbehind a transaction pooler runs on a one-shot connection and
starts withDEALLOCATE ALL, so describing the query cannot fail with
42P05 prepared statement "sN" already exists(#227).read_rowsaccepts a statement ending in a-- comment, a block comment
or;on the session path (select 1 -- c\n) (#225).read_rowsrejects a negative or non-integerlimitwith-32602instead
of using the default of 1000 (#225).- A text-family column keeps its value as is: a JSON-array-shaped string
([1,2,3]), a UUID-shaped hash,POINT(…)orST_…(…)is no longer
rewritten into an array, a uuid, a geometry or raw SQL (#227). - A
byteacolumn accepts only theBLOB:wire format. Any other string,
such as an unresolvedBLOB_FILE_REF:or corrupt base64, is an error (#227). - The
read_rowscursor no longer over-rewinds on a full batch, which
duplicated rows across pages (#220, #221). read_rowsreturnsNaN/Infinity, date/timestampinfinity,
24:00:00and JSONnullinstead of SQLnull, andmoneyas decimal
text instead of integer cents (#220, #221).insert_recordscasts types that have no text assignment cast (inet,
cidr,macaddr,xml,bit,tsvector, geometric and range types),
writes JSON strings intojson/jsonb, uses the column length for
bit(n), and decodes theBLOB:format only forbyteacolumns (#220,
#221, #222, #223).- A session cursor rejects a different query under the same
session_id
instead of returning the old cursor's rows (#220, #221). get_columns:is_generatedfor stored generated andALWAYSidentity
columns (notBY DEFAULTidentity, which accepts values — #224, #226),
datetime_precision,full_type, domain base types, and materialized
view columns (#220, #221).- Binding errors no longer echo row values (#220, #221).
Known limitations
money[], andmoneyinside a composite, read in the server's locale
form ({"$1,234.50"}): only a scalarmoneycolumn is read as
::numeric::text. Copying such a value to a server with a different
lc_monetarycan misparse or fail.- A user-defined composite named like a built-in type (
myschema.date,
myschema.box) is cast to the built-in type on insert, so the write
fails (column … is of type myschema.date but expression is of type date). Pre-existing.