]> git.ipfire.org Git - thirdparty/psycopg.git/log
thirdparty/psycopg.git
2 years agodocs: add entry about segfault on fork fixed 360/head
Daniele Varrazzo [Sun, 28 Aug 2022 10:00:12 +0000 (11:00 +0100)] 
docs: add entry about segfault on fork fixed

2 years agofix: use a static notification function for PQsetNoticeReceiver.
Florian Apolloner [Sat, 27 Aug 2022 15:36:33 +0000 (17:36 +0200)] 
fix: use a static notification function for PQsetNoticeReceiver.

The connection is passed via the optional *arg.

Fixes #300

2 years agobuild: build ldap with sasl and ssl support
Daniele Varrazzo [Sat, 27 Aug 2022 11:37:45 +0000 (12:37 +0100)] 
build: build ldap with sasl and ssl support

Pass the libpq build prefix to configure in order to find just built
libraries.

2 years agobuild: upgrade system packages before building libpq
Daniele Varrazzo [Sat, 27 Aug 2022 12:12:55 +0000 (13:12 +0100)] 
build: upgrade system packages before building libpq

2 years agochore: bump version to 3.1 beta 1 to test building packages
Daniele Varrazzo [Sat, 27 Aug 2022 09:57:09 +0000 (10:57 +0100)] 
chore: bump version to 3.1 beta 1 to test building packages

2 years agochore: upgrade libpq dependencies
Daniele Varrazzo [Sat, 27 Aug 2022 10:01:48 +0000 (11:01 +0100)] 
chore: upgrade libpq dependencies

2 years agodocs: fix link to numeric-to-float recipe
Daniele Varrazzo [Wed, 24 Aug 2022 17:50:18 +0000 (19:50 +0200)] 
docs: fix link to numeric-to-float recipe

2 years agofix: avoid all uses of PQconn.send_query in pipeline mode
Daniele Varrazzo [Tue, 23 Aug 2022 22:39:40 +0000 (00:39 +0200)] 
fix: avoid all uses of PQconn.send_query in pipeline mode

We stopped using it in normal querying because, until libpq 14.4, the
libpq complained about "message type 0x33 arrived from server while
idle" (see #314). But usage remained for internal queries such as BEGIN.

In libpq 14.5, Postgres devs tried to fix the issue... and broke
PQsendQuery altogether :(

Hopefully the issue will be solved in future libpq versions, but we can
work around it completely.

Close #350.

2 years agofeat: add pq._debug module to investigate libpq issues
Daniele Varrazzo [Tue, 23 Aug 2022 22:18:56 +0000 (00:18 +0200)] 
feat: add pq._debug module to investigate libpq issues

2 years agoci: don't install modules in editable mode to run packages test
Daniele Varrazzo [Mon, 22 Aug 2022 09:42:52 +0000 (11:42 +0200)] 
ci: don't install modules in editable mode to run packages test

Something else that broke after setuptools 64 release. See tox-dev/tox#2479
for more details.

Reported something at pypa/setuptools#3557

2 years agotest: add missing asserts
Daniele Varrazzo [Sat, 13 Aug 2022 21:42:05 +0000 (23:42 +0200)] 
test: add missing asserts

2 years agochore: fix typos spotted by codespell 2.2.1
Denis Laxalde [Fri, 19 Aug 2022 17:05:05 +0000 (19:05 +0200)] 
chore: fix typos spotted by codespell 2.2.1

2 years agoFix typo: shoul => should
Sergey Fedoseev [Wed, 17 Aug 2022 16:30:42 +0000 (21:30 +0500)] 
Fix typo: shoul => should

2 years agodocs: fix a typo in FileWriter docstring
Denis Laxalde [Tue, 16 Aug 2022 14:17:29 +0000 (16:17 +0200)] 
docs: fix a typo in FileWriter docstring

2 years agofix: consider pipeline mode not supported with libpq 14.5
Daniele Varrazzo [Mon, 15 Aug 2022 11:52:04 +0000 (13:52 +0200)] 
fix: consider pipeline mode not supported with libpq 14.5

Improve diagnostics about the reason why the pipeline mode is not
supported. Improve not supported tests.

2 years agotest: allow to use the != operator in make.libpq
Daniele Varrazzo [Mon, 15 Aug 2022 11:46:46 +0000 (13:46 +0200)] 
test: allow to use the != operator in make.libpq

2 years agofeat: use version() as __build_version__ for pq python implementation
Daniele Varrazzo [Mon, 15 Aug 2022 11:41:01 +0000 (13:41 +0200)] 
feat: use version() as __build_version__ for pq python implementation

Having __build_version__ to be null makes version checking needlessly
convoluted and version() has to be used anyway as fallback.

2 years agorefactor(psycopg_c): define and use an ARRAYSIZE macro
Daniele Varrazzo [Sat, 13 Aug 2022 01:44:17 +0000 (03:44 +0200)] 
refactor(psycopg_c): define and use an ARRAYSIZE macro

2 years agorefactor(psycopg_c): drop deprecated use of DEF in Cython
Daniele Varrazzo [Sat, 13 Aug 2022 01:19:35 +0000 (03:19 +0200)] 
refactor(psycopg_c): drop deprecated use of DEF in Cython

See cython/cython#4310

2 years agoperf(psycopg_c): avoid to create a tuple in fetch_many() loop
Daniele Varrazzo [Mon, 15 Aug 2022 00:50:50 +0000 (02:50 +0200)] 
perf(psycopg_c): avoid to create a tuple in fetch_many() loop

2 years agorefactor: expose optimized functions directly from the origin modules
Daniele Varrazzo [Mon, 15 Aug 2022 00:49:24 +0000 (02:49 +0200)] 
refactor: expose optimized functions directly from the origin modules

Don't check for the availability of the optimized module in every module
using potentially optimized functions.

2 years agofix(psycopg_c): guard PQflush calls for invalid connections
Daniele Varrazzo [Mon, 15 Aug 2022 00:46:19 +0000 (02:46 +0200)] 
fix(psycopg_c): guard PQflush calls for invalid connections

Unlike other libpq functions, PQflush() doesn't have a guard for invalid
connections and will segfault if the connection gets closed.

Also check the return value of the PQflush calls: as we are not using
the wrapped version pgconn.flush(), the function doesn't automatically
throw an exception on failure.

2 years agochore: use `license_files` entry in metadata
Daniele Varrazzo [Sat, 13 Aug 2022 00:32:21 +0000 (02:32 +0200)] 
chore: use `license_files` entry in metadata

`license_file` is deprecated.

2 years agoci: specify non-editable install in tox tests
Daniele Varrazzo [Fri, 12 Aug 2022 23:35:41 +0000 (01:35 +0200)] 
ci: specify non-editable install in tox tests

Work around tox-dev/tox#2479 (editable installs in tox broken by setuptools
v64) and tox-dev/tox#2480 (failure to use `toxinidir` in `deps`).

Use -e consistently in the linting steps instead, because they are
defined with skip_install=True so it seems a good idea to use it. These
steps don't seem affect by the setuptools issue.

2 years agorefactor: drop repeated operation in sync/async TypeInfo.fetch()
Daniele Varrazzo [Fri, 12 Aug 2022 02:00:12 +0000 (04:00 +0200)] 
refactor: drop repeated operation in sync/async TypeInfo.fetch()

2 years agodocs: fix typo "flaot"
Daniele Varrazzo [Fri, 12 Aug 2022 01:43:59 +0000 (03:43 +0200)] 
docs: fix typo "flaot"

2 years agodocs: reword blurb about binary copy and make it a warning
Daniele Varrazzo [Fri, 12 Aug 2022 01:40:20 +0000 (03:40 +0200)] 
docs: reword blurb about binary copy and make it a warning

2 years agodocs: fix typo: "reurned"
Daniele Varrazzo [Fri, 12 Aug 2022 01:25:42 +0000 (03:25 +0200)] 
docs: fix typo: "reurned"

Reurned... ⚱️ ->⚱️

2 years agodocs: fix example and reword around multiple-query statements
Daniele Varrazzo [Fri, 12 Aug 2022 01:25:15 +0000 (03:25 +0200)] 
docs: fix example and reword around multiple-query statements

2 years agodocs: link to the "from psycopg2" page from the "basic usage" top section
Daniele Varrazzo [Fri, 12 Aug 2022 01:24:25 +0000 (03:24 +0200)] 
docs: link to the "from psycopg2" page from the "basic usage" top section

2 years agodocs: quote examples of pip install with extras
Daniele Varrazzo [Fri, 5 Aug 2022 23:47:54 +0000 (01:47 +0200)] 
docs: quote examples of pip install with extras

zsh doesn't parse the square brackets as expected.

See #347.

3 years agoFix syntax in example
Sergey Fedoseev [Sat, 30 Jul 2022 12:39:47 +0000 (17:39 +0500)] 
Fix syntax in example

3 years agobuild: use "latest" version of github builders
Daniele Varrazzo [Thu, 28 Jul 2022 13:19:16 +0000 (15:19 +0200)] 
build: use "latest" version of github builders

3 years agoMerge branch 'build-macos-arm64'
Daniele Varrazzo [Thu, 28 Jul 2022 11:24:42 +0000 (13:24 +0200)] 
Merge branch 'build-macos-arm64'

3 years agodocs: mention macOS arm64 build script in news file
Daniele Varrazzo [Thu, 28 Jul 2022 11:17:23 +0000 (13:17 +0200)] 
docs: mention macOS arm64 build script in news file

3 years agobuild: add scripts to build macOS arm64 packages
Daniele Varrazzo [Sat, 16 Jul 2022 18:50:45 +0000 (19:50 +0100)] 
build: add scripts to build macOS arm64 packages

3 years agochore: bump version number to 3.0.16
Daniele Varrazzo [Thu, 28 Jul 2022 10:08:06 +0000 (12:08 +0200)] 
chore: bump version number to 3.0.16

3 years agoMerge branch 'fix-343'
Daniele Varrazzo [Thu, 28 Jul 2022 10:06:26 +0000 (12:06 +0200)] 
Merge branch 'fix-343'

3 years agofix: fix Cursor.rowcount after non-SELECT tuple-returining queries
Daniele Varrazzo [Thu, 28 Jul 2022 09:34:57 +0000 (11:34 +0200)] 
fix: fix Cursor.rowcount after non-SELECT tuple-returining queries

PQcmdTuples doesn't return a value after SHOW and other type of queries.

Close #343

3 years agotest: add tests to reveal the rowcount problem with SHOW
Daniele Varrazzo [Thu, 28 Jul 2022 09:26:49 +0000 (11:26 +0200)] 
test: add tests to reveal the rowcount problem with SHOW

See #343

3 years agodocs: mention 3.1 automatic DNS resolution in async page
Daniele Varrazzo [Tue, 26 Jul 2022 12:58:53 +0000 (13:58 +0100)] 
docs: mention 3.1 automatic DNS resolution in async page

Also fix several glitches in the dns page documentation.

3 years agodocs: NOTIFY command in uppercase
Daniele Varrazzo [Tue, 26 Jul 2022 12:25:56 +0000 (13:25 +0100)] 
docs: NOTIFY command in uppercase

3 years agoMerge branch 'copy-writer'
Daniele Varrazzo [Tue, 26 Jul 2022 12:25:49 +0000 (13:25 +0100)] 
Merge branch 'copy-writer'

3 years agodocs(copy): add documentation for COPY Writer objects
Daniele Varrazzo [Sun, 24 Jul 2022 03:01:25 +0000 (04:01 +0100)] 
docs(copy): add documentation for COPY Writer objects

3 years agorefactor: unify code paths to set the rowcount
Daniele Varrazzo [Sun, 24 Jul 2022 02:35:28 +0000 (03:35 +0100)] 
refactor: unify code paths to set the rowcount

3 years agofeat(copy): add 'binary' param to copy object
Daniele Varrazzo [Sun, 24 Jul 2022 02:22:32 +0000 (03:22 +0100)] 
feat(copy): add 'binary' param to copy object

This allows to write binary format even when the query has executed no
COPY operation.

Notice that now we have introduced tests that convert sample_records
into sample_binary: because small numbers would be dumped to int2, use
values large enough to require int4.

3 years agorefactor(cursor): rename _set_current_result -> _select_current_result
Daniele Varrazzo [Sun, 24 Jul 2022 00:37:56 +0000 (01:37 +0100)] 
refactor(cursor): rename _set_current_result -> _select_current_result

3 years agofeat(copy): add FileWriter to write copy data to a file-like object
Daniele Varrazzo [Sat, 23 Jul 2022 22:13:41 +0000 (23:13 +0100)] 
feat(copy): add FileWriter to write copy data to a file-like object

3 years agorefactor(copy): rename QueueWriter to QueuedLibpqWriter
Daniele Varrazzo [Sat, 23 Jul 2022 22:02:21 +0000 (23:02 +0100)] 
refactor(copy): rename QueueWriter to QueuedLibpqWriter

3 years agoperf(copy): use non-thread/task copy writers by default
Daniele Varrazzo [Sat, 23 Jul 2022 21:44:55 +0000 (22:44 +0100)] 
perf(copy): use non-thread/task copy writers by default

Further benchmarks show no performance improvement using a writer
thread, and a slight slowdown using a writer async task. If that's the
case we can keep it simpler.

3 years agodocs: fix docstrings for copy objects
Daniele Varrazzo [Sat, 23 Jul 2022 20:37:48 +0000 (21:37 +0100)] 
docs: fix docstrings for copy objects

3 years agorefactor(copy): rename ConnectionWriter to LibpqWriter
Daniele Varrazzo [Sun, 12 Jun 2022 22:53:26 +0000 (00:53 +0200)] 
refactor(copy): rename ConnectionWriter to LibpqWriter

The class takes a cursor as input so the previous name was misleading.

3 years agorefactor(copy): make the writer entirely responsible of the libpq copy state
Daniele Varrazzo [Sat, 11 Jun 2022 22:47:50 +0000 (00:47 +0200)] 
refactor(copy): make the writer entirely responsible of the libpq copy state

This way we can create a writer which is entirely independent from the
libpq and the connection, which is useful, for instance, to format a
file with copy data.

3 years agofeat(copy): add writer param AsyncCursor.copy()
Daniele Varrazzo [Sat, 11 Jun 2022 15:19:46 +0000 (17:19 +0200)] 
feat(copy): add writer param AsyncCursor.copy()

Add async copy writers similar to the sync ones.

3 years agofeat(copy): add ConnectionWriter
Daniele Varrazzo [Sat, 11 Jun 2022 14:58:02 +0000 (16:58 +0200)] 
feat(copy): add ConnectionWriter

This writer allows direct writing to the libpw, without buffering queue,
and provides the interface for a writer using a libpq connection to
write.

3 years agofeat(copy): add 'writer' parameter to Cursor.copy()
Daniele Varrazzo [Sat, 11 Jun 2022 14:56:13 +0000 (16:56 +0200)] 
feat(copy): add 'writer' parameter to Cursor.copy()

3 years agorefactor(copy): add Writer object
Daniele Varrazzo [Sat, 11 Jun 2022 14:21:38 +0000 (16:21 +0200)] 
refactor(copy): add Writer object

This separation of responsibility will allow to:

- create writers that e.g. produce a file rather than writing to a
connection;

- create writers that write directly instead of using a queue (see
https://github.com/psycopg/psycopg/discussions/111 for an example of users
unhappy about that. I still don't see their nervousness justified, but
I'm ok to provide them an escape hatch if it's easy to implement).

3 years agorefactor(copy) use already looked-up pgconn instead of the connection one
Daniele Varrazzo [Sat, 11 Jun 2022 08:46:01 +0000 (10:46 +0200)] 
refactor(copy) use already looked-up pgconn instead of the connection one

Left out of previous refactoring.

3 years agoMerge branch 'docs-no-external-modules'
Daniele Varrazzo [Mon, 18 Jul 2022 23:43:03 +0000 (00:43 +0100)] 
Merge branch 'docs-no-external-modules'

3 years agodocs: allow to read the libpq definitions from a local file
Daniele Varrazzo [Mon, 18 Jul 2022 13:39:55 +0000 (14:39 +0100)] 
docs: allow to read the libpq definitions from a local file

For the poor souls which don't have external access building the docs.
See #337.

3 years agodocs: upgrade sphinx version to build docs
Daniele Varrazzo [Mon, 18 Jul 2022 13:28:30 +0000 (14:28 +0100)] 
docs: upgrade sphinx version to build docs

The version of furo used is not compatible with the newly available
Sphinx.

3 years agodocs: fix build with sphinx 5.0
Martin Weinelt [Mon, 18 Jul 2022 11:58:55 +0000 (13:58 +0200)] 
docs: fix build with sphinx 5.0

The `no_docstring` argument to `Documenter.add_content()` has been
deprecated in Sphinx 3.4.0 and removed in Sphinx 5.0.

This will not break compatibility with earlier versions, since the
`no_docstring` argument always carried a default value.

https://github.com/sphinx-doc/sphinx/blob/v4.2.0/sphinx/ext/autodoc/__init__.py#L601
https://github.com/sphinx-doc/sphinx/blob/v4.5.0/sphinx/ext/autodoc/__init__.py#L596

3 years agodocs: move documentation from shapely module docstrings to docs
Daniele Varrazzo [Mon, 18 Jul 2022 07:34:25 +0000 (08:34 +0100)] 
docs: move documentation from shapely module docstrings to docs

This avoids the dependency on shapely to build the docs.

3 years agodocs: move documentation from _dns module docstrings to docs
Daniele Varrazzo [Mon, 18 Jul 2022 07:27:22 +0000 (08:27 +0100)] 
docs: move documentation from _dns module docstrings to docs

Allow to build the _dns documentation without importing the module,
which requires external dependencies.

3 years agodocs: add skip-list to avoid importing external module
Daniele Varrazzo [Mon, 18 Jul 2022 07:23:55 +0000 (08:23 +0100)] 
docs: add skip-list to avoid importing external module

In sandboxed environments dnspython doesn't work because it cannot read
`/etc/resolv.conf`/

See #337 for details.

3 years agotest: fix proxy-based tests confused by the PGHOST env var
Daniele Varrazzo [Tue, 12 Jul 2022 23:29:19 +0000 (00:29 +0100)] 
test: fix proxy-based tests confused by the PGHOST env var

3 years agotest: fix dsn manipulation tests confused by the env vars
Daniele Varrazzo [Tue, 12 Jul 2022 23:19:24 +0000 (00:19 +0100)] 
test: fix dsn manipulation tests confused by the env vars

Add fixture to clean up the PG* vars from the env and replace them with
the values to test.

3 years agodocs: fix install instruction in docker to test the pool too
Daniele Varrazzo [Tue, 12 Jul 2022 23:18:45 +0000 (00:18 +0100)] 
docs: fix install instruction in docker to test the pool too

3 years agoMerge branch 'crdb'
Daniele Varrazzo [Tue, 12 Jul 2022 12:15:00 +0000 (13:15 +0100)] 
Merge branch 'crdb'

3 years agotest(crdb): test severity_nonlocalized on CRDB versions supporting it
Daniele Varrazzo [Tue, 12 Jul 2022 11:38:11 +0000 (12:38 +0100)] 
test(crdb): test severity_nonlocalized on CRDB versions supporting it

3 years agotest(crdb): tweak server-side cursors test to run on CRDB
Daniele Varrazzo [Tue, 12 Jul 2022 11:24:21 +0000 (12:24 +0100)] 
test(crdb): tweak server-side cursors test to run on CRDB

Server-side cursors are well supported starting from CRDB 22.1.3.

3 years agodocs: add note to test readme about testing with CRDB
Daniele Varrazzo [Tue, 12 Jul 2022 11:20:46 +0000 (12:20 +0100)] 
docs: add note to test readme about testing with CRDB

3 years agodocs(crdb): docs refinements
Daniele Varrazzo [Tue, 5 Jul 2022 12:17:17 +0000 (13:17 +0100)] 
docs(crdb): docs refinements

3 years agodocs(crdb): add sentence to relate crdb adapters to pg ones
Daniele Varrazzo [Tue, 5 Jul 2022 08:44:22 +0000 (09:44 +0100)] 
docs(crdb): add sentence to relate crdb adapters to pg ones

3 years agotest: fix version check using proper PostgreSQL version schema
Daniele Varrazzo [Thu, 16 Jun 2022 23:42:05 +0000 (01:42 +0200)] 
test: fix version check using proper PostgreSQL version schema

Previously to specify "libpq 14.2" it was needed to use 14.0.2.

3 years agotest(crdb): add tests to expose canceled copy problem
Daniele Varrazzo [Sun, 12 Jun 2022 01:04:14 +0000 (03:04 +0200)] 
test(crdb): add tests to expose canceled copy problem

See https://github.com/cockroachdb/cockroach/issues/81559

3 years agotest(crdb): mark a few tests slow
Daniele Varrazzo [Sun, 12 Jun 2022 00:43:20 +0000 (02:43 +0200)] 
test(crdb): mark a few tests slow

3 years agotest(crdb): add random copy test
Daniele Varrazzo [Sat, 11 Jun 2022 08:45:08 +0000 (10:45 +0200)] 
test(crdb): add random copy test

Tests are currently skipped because of
https://github.com/cockroachdb/cockroach/issues/82792

3 years agotest(crdb): don't use pg_backend_pid in pool tests
Daniele Varrazzo [Wed, 8 Jun 2022 01:35:03 +0000 (03:35 +0200)] 
test(crdb): don't use pg_backend_pid in pool tests

You can express the same test using info.backend_pid, which is supported
from CRDB 22.1.

3 years agotest(crdb): add "suicide" tests
Daniele Varrazzo [Wed, 8 Jun 2022 01:17:25 +0000 (03:17 +0200)] 
test(crdb): add "suicide" tests

3 years agotest(crdb): enable tests depending on backend_pid on CRDB 22.1
Daniele Varrazzo [Wed, 8 Jun 2022 00:35:19 +0000 (02:35 +0200)] 
test(crdb): enable tests depending on backend_pid on CRDB 22.1

3 years agodocs(crdb): include changes in CRDB 22.1
Daniele Varrazzo [Wed, 8 Jun 2022 00:34:35 +0000 (02:34 +0200)] 
docs(crdb): include changes in CRDB 22.1

3 years agotest(crdb): tag better the skip reason for server-side tests
Daniele Varrazzo [Tue, 7 Jun 2022 23:11:45 +0000 (01:11 +0200)] 
test(crdb): tag better the skip reason for server-side tests

Still skip all the other DECLARE tests; waiting for a couple of issues
being fixed in CRDB.

3 years agotest(crdb): add tests related to session termination
Daniele Varrazzo [Tue, 7 Jun 2022 22:02:19 +0000 (00:02 +0200)] 
test(crdb): add tests related to session termination

3 years agotest(crdb): use the crdb_skip marker
Daniele Varrazzo [Tue, 7 Jun 2022 21:28:11 +0000 (23:28 +0200)] 
test(crdb): use the crdb_skip marker

Enable cancel-based tests on CRDB 22.

3 years agotest(crdb): accout for backend_pid supported since CRDB 22
Daniele Varrazzo [Tue, 7 Jun 2022 21:26:35 +0000 (23:26 +0200)] 
test(crdb): accout for backend_pid supported since CRDB 22

3 years agotest(crdb): add crdb_skip marker
Daniele Varrazzo [Tue, 7 Jun 2022 20:33:33 +0000 (22:33 +0200)] 
test(crdb): add crdb_skip marker

3 years agotest: allow to mark tests to run only or skip on certain version ranges
Daniele Varrazzo [Tue, 7 Jun 2022 20:10:36 +0000 (22:10 +0200)] 
test: allow to mark tests to run only or skip on certain version ranges

3 years agodocs(crdb): add crdb module docs
Daniele Varrazzo [Tue, 7 Jun 2022 06:13:07 +0000 (08:13 +0200)] 
docs(crdb): add crdb module docs

3 years agofix(crdb): raise NotSupportedError on two-phase commit methods
Daniele Varrazzo [Tue, 7 Jun 2022 06:01:46 +0000 (08:01 +0200)] 
fix(crdb): raise NotSupportedError on two-phase commit methods

3 years agotest(crdb): add tests to test CHANGEFEED together with stream()
Daniele Varrazzo [Tue, 7 Jun 2022 04:48:01 +0000 (06:48 +0200)] 
test(crdb): add tests to test CHANGEFEED together with stream()

3 years agorefactor(crdb): drop crdb_version; use server_version instead
Daniele Varrazzo [Tue, 7 Jun 2022 03:02:07 +0000 (05:02 +0200)] 
refactor(crdb): drop crdb_version; use server_version instead

The server_version returned by CRDB is a misleading dummy. The version
tested is reported as 13.0 but certain features are more akin to
different versions (e.g. lack of range support and different behaviour
w.r.t. unknown/text adaptation).

3 years agorefactor(crdb) split crdb module into a package
Daniele Varrazzo [Tue, 7 Jun 2022 02:22:10 +0000 (04:22 +0200)] 
refactor(crdb) split crdb module into a package

3 years agotest(crdb): get connection class from fixture to make sure to test CRDB objects
Daniele Varrazzo [Tue, 7 Jun 2022 01:52:11 +0000 (03:52 +0200)] 
test(crdb): get connection class from fixture to make sure to test CRDB objects

3 years agorefactor(crdb): don't mix pg and crdb json configuration
Daniele Varrazzo [Tue, 7 Jun 2022 01:46:51 +0000 (03:46 +0200)] 
refactor(crdb): don't mix pg and crdb json configuration

3 years agofix(crdb): base context transaction tests on DML rather than DDL
Daniele Varrazzo [Mon, 6 Jun 2022 23:14:59 +0000 (01:14 +0200)] 
fix(crdb): base context transaction tests on DML rather than DDL

On CRDB we may incur in problems caused by the table being dropped.

3 years agotest(crdb): skip tests with arrays of json[b]
Daniele Varrazzo [Mon, 6 Jun 2022 22:50:34 +0000 (00:50 +0200)] 
test(crdb): skip tests with arrays of json[b]

Not supported by CRDB: https://github.com/cockroachdb/cockroach/issues/23468

3 years agotest: add json[b] arrays dump/load tests
Daniele Varrazzo [Mon, 6 Jun 2022 22:33:05 +0000 (00:33 +0200)] 
test: add json[b] arrays dump/load tests

Also refactor tests a bit to unify the json/jsonb in a parametric
format.

3 years agotest(crdb): skip tests based on missing features
Daniele Varrazzo [Mon, 6 Jun 2022 21:59:10 +0000 (23:59 +0200)] 
test(crdb): skip tests based on missing features

With this changeset, all tests pass or are skipped on CRDB 21.2.10 \o/

3 years agotest(crdb): fix random tests
Daniele Varrazzo [Mon, 6 Jun 2022 21:57:31 +0000 (23:57 +0200)] 
test(crdb): fix random tests

- Keep into account the different supported interval range
- Allow for float representation rounding (pre-PG 12 behaviour)
- Run leak tests in transactions to allow to recreate the tables