Robert Vollmert
4c8c3ccfb2
nix: pass through hspec arguments to postgrest-test-spec
...
This allows e.g. running
postgrest-test-spec --match "some failing test"
2022-06-07 21:36:38 +02:00
Robert Vollmert
09f3e09c96
tests: don't specify openapi root result
...
Whereas the test used to specify a body of
[{"qiName":"referrals","qiSchema":"test"},"private"]
we see both
[{"qiName":"authors_w_entities","qiSchema":"test"},"test"]
and
[{"qiName":"organizations","qiSchema":"test"},"test"]
on the GHC 9.2 upgrade PR.
This changes the test to no longer expect a particular body.
Compare:
- https://github.com/PostgREST/postgrest/pull/2292#issuecomment-1146160792
- https://github.com/PostgREST/postgrest/issues/1698
2022-06-07 16:56:22 +02:00
Franz-Josef Färber and Steve Chavez
807364bd7b
RPC POST for function w/single unnamed XML param
2022-06-03 11:52:57 -05:00
steve-chavez
d14f745406
bump version to 9.0.0.20220531
2022-05-31 18:19:02 -05:00
steve-chavez
1cdc9169c7
fix: using CPU while idle
2022-05-31 12:17:36 -05:00
steve-chavez
9aa400c8f3
fix: disable parallel GC for perf on high-core CPU
2022-05-31 12:17:36 -05:00
Laurence Isla and GitHub
e4cdb8c491
ci: run on branches starting with "rel-"
2022-05-30 22:38:05 -05:00
Laurence Isla and Steve Chavez
c812a3fe3e
ci: Run ARM builds on releases
2022-05-16 18:10:36 -05:00
steve-chavez
1ab11de96c
bump version to 9.0.0.20220516
2022-05-16 14:36:04 -05:00
steve-chavez
f7b173163c
fix: ignore views on col/fk as target
...
Also refactor self relationship findRel logic
2022-05-16 12:22:24 -05:00
steve-chavez
2be63b36d6
refactor: self relationship
...
* Add test for self relationship in view
2022-05-09 21:31:19 -05:00
steve-chavez
c60380b5fc
perf: RelationshipsMap with foreign schema as key
2022-05-09 21:31:19 -05:00
steve-chavez
d88b16e5ab
fix: allow cast on types with underscores/numbers
...
e.g. select=oid_array::_int4
2022-05-09 13:02:33 -05:00
Laurence Isla and GitHub
867f2569a0
ci: Fix Windows build using Stack
...
Added PostgreSQL binaries to the PATH and removed the use of msys2-keyring
2022-05-05 00:06:00 -05:00
Franz-Josef Färber and Steve Chavez
5a3fbd7111
Allow returning XML from single-column queries
2022-05-04 10:27:28 -05:00
Laurence Isla and GitHub
a2349d90c0
Reorganize error groups
...
* Grouped Hasql errors into one error and renamed it to InternalError
* Move all the General errors to ApiRequest errors
2022-05-02 21:16:31 -05:00
steve-chavez
980f27a6d1
bump version to 9.0.0.20220502
2022-05-02 16:06:51 -05:00
steve-chavez
ce96c88ba0
test: increase memory tests memory by 1M
2022-05-02 11:12:02 -05:00
steve-chavez
50b275d3e2
refactor: move PUT checks to ApiRequest
2022-05-02 11:12:02 -05:00
steve-chavez
e90391b7ac
limited update/delete requires explicit order
...
* limited update/delete now works on views with explicit order
* no default order, enforce order presence
* apply row count to ensure limited mutations
* move requiring order to ApiRequest
2022-05-02 11:12:02 -05:00
Laurence Isla and GitHub
5ad8800773
feat: Allow limit=0 in query params to return an empty array
2022-04-28 17:14:29 -05:00
Franz-Josef Färber and Steve Chavez
d2aa50be52
Allow returning XML from RPCs
2022-04-26 17:37:59 -05:00
Laurence Isla and GitHub
a8477b7822
Add tests for the ~ ltree operator ( #2267 )
2022-04-26 22:48:15 +02:00
steve-chavez
115dae7484
perf: Relationship list to a hash map
2022-04-25 21:41:51 -05:00
steve-chavez
e4006da9bc
perf: remove toSourceRel
...
toSourceRel is an expensive operation since it iterates over all the
relationships detected. We now use an alias on the CTE so embedding can
work without toSourceRel.
2022-04-25 21:41:51 -05:00
steve-chavez
a47c59baca
fix: restrict generated m2m relationships
...
Only add m2m relationship based on real junctions:
a table has FKs to two other tables and the FK columns
are part of the PK columns.
Also add some stats to big_schema.sql
2022-04-25 12:35:16 -05:00
dependabot[bot] and Steve Chavez
b191431530
build(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v3.0.0...v3.1.0 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-04-25 12:24:38 -05:00
Laurence Isla and GitHub
9bdb4e5c4f
ci: remove armv7 architectures for ARM builds
...
Now only builds aarch64 on the remote server without Docker
2022-04-23 20:30:07 +02:00
steve-chavez
07d619981e
perf: don't lookup Table pkCols unnecessarily
...
handleCreate only needs it on some headers, udpate and delete don't need
pkcols.
2022-04-22 19:04:16 -05:00
steve-chavez
778b8d074d
refactor: merge Column list into Table
...
* Remove Table from Column
* Correct OpenAPI test where the schema was appearing for the enum unnecessarily
* Increase memory-tests consumption by 2M
Seems the Hasql decoder consumes more memory now that the allTables
results also have [Column] inside.
2022-04-22 19:04:16 -05:00
steve-chavez
902e4e8921
refactor: clean allColumns query
...
* Add OpenAPI test to ensure enum labels are present
* Remove unnecessary fk/pk columns cte
* Remove unnecessary step for parsing enum labels
2022-04-22 11:46:45 -05:00
steve-chavez
d2719420f4
refactor: PKcols in table, ViewKeyDependency type
...
* Get PKcols inside tables - done with SQL for tables and
with an additional step in Haskell for views.
This fixes an fk column being considered as a pk column on views
and corrects the test added on
https://github.com/PostgREST/postgrest/pull/1875/files/1d549768580310e18aac4ffa6dbd01c5b77934a7#r853674126
* classify view key dependencies in SQL
* remove Column from Relationship
* Merge cols/fcols in Relationship and
ensure allM2ORels and allViewsKeyDependencies fk columns
are ordered - done by attnum in SQL
* Cardinality now contains relColumns instead of Relationship -
this simplifies getJoinConditions.
2022-04-21 14:44:45 -05:00
steve-chavez
057e8d63bf
test: add big schema openapi test
...
The io test is marked as pending for now, because the stack size it
requires is too big.
2022-04-20 20:05:11 -05:00
steve-chavez
f4e171aa2b
refactor: ignore partitions in allM2ORels
...
Also clarify foreign key filter
2022-04-19 17:23:12 -05:00
steve-chavez
7f1507b9fb
refactor: remove Table from Relationship
...
Just having the QualifiedIdentifier gets us closer to having
Relationship as a Table attribute since it avoids a cyclic dependency
* remove unnecessary findTable
* modify RootSpec test
2022-04-18 15:48:03 -05:00
steve-chavez
cdcc175abf
refactor: table list to table map
2022-04-18 15:48:03 -05:00
steve-chavez
f995799e8f
refactor: remove fkey from allPrimaryKeys query
...
The query had the unnecessary 'f' in `c.contype in ('p', 'u', 'f')`
Also comment and clarify the query by using explicit JOINs
2022-04-18 15:48:03 -05:00
steve-chavez
44e2b2fbb4
refactor: DRY allTables/accessibleTables query
2022-04-18 15:48:03 -05:00
steve-chavez
2eaf81334e
nix: local history for nix-shell
2022-04-18 15:48:03 -05:00
steve-chavez
c399b1f5f8
nix: log all statements in temp db
2022-04-18 15:48:03 -05:00
Laurence Isla and GitHub
bc7d54c7d2
Add CI for ARM architectures ( #2127 )
2022-04-18 17:40:32 +02:00
Laurence Isla and GitHub
7589102c6c
Fix misleading disambiguation error where relationship looks like valid syntax
...
* Add columns for the m2m relationship
2022-04-12 00:02:19 +02:00
Michael Kane Juncker and Wolfgang Walther
007f49a8bc
feat(query): add basic regular expression operator support - refs #2236
2022-04-11 08:33:16 +02:00
dependabot[bot] and Wolfgang Walther
a768bcbf20
build(deps): bump codecov/codecov-action from 2.1.0 to 3.0.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3.0.0 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-04-11 08:23:26 +02:00
dependabot[bot] and Wolfgang Walther
cb145271ac
build(deps): bump actions/cache from 2.1.7 to 3
...
Bumps [actions/cache](https://github.com/actions/cache ) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases )
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-03-28 07:45:07 +02:00
Laurence Isla and GitHub
9124dfd427
Bypass FreeBSD builds due to timeouts
2022-03-26 15:14:54 -05:00
Laurence Isla
8e86177486
bump version to 9.0.0.20220326
2022-03-26 12:26:47 -05:00
Laurence Isla and GitHub
fe898c27ae
Fix incorrectly placed feature in CHANGELOG
...
Move incorrectly placed feature for PostgREST errors from v9.0.0 to Upcoming
2022-03-26 11:08:37 -05:00
steve-chavez
f3f9030c48
disallow limit/offset on views
2022-03-26 15:29:13 +01:00
steve-chavez
73dc2692b1
refactor: add findTable function
2022-03-26 15:29:13 +01:00