Remo and GitHub
8c35c9d711
Fix CI tests for Postgres 9.4 ( #1482 )
2020-04-14 11:00:43 -05:00
Wolfgang Walther and GitHub
be674eb41d
Fix POST, PATCH, DELETE with ?select= and empty body or return=minimal ( #1471 )
...
* add tests for POST, PATCH, DELETE when using ?select= with empty bodies or ret=min
* fix select with empty bodies and ret=min
* improved tests for default cases, fixed computed overloaded columns on empty-body?select= PATCH
2020-04-13 12:32:35 -05:00
steve-chavez
052843ac9b
Update BACKERS.md
2020-04-13 12:13:35 -05:00
Wolfgang Walther and GitHub
c524531784
Fix overloaded computed columns on RPC ( #1473 )
...
* fix some typos and spelling
* fix pg_source CTE name should be prefixed with pgrst_
* added tests for overloaded computed columns on patch calls
2020-04-06 14:04:55 -05:00
Wolfgang Walther and GitHub
82fa1d8812
add postgres-12 tests to circleci ( #1472 )
...
* circleci: new postgres docker containers need host auth trust
2020-04-06 11:00:26 -05:00
steve-chavez
2b61a63686
Bump to version v7.0.0
v7.0.0
2020-04-03 11:22:11 -05:00
steve-chavez
18e45659ea
Fix compiling on windows(unix socket issue)
...
Group unix socket functionality into its own module
2020-04-03 11:22:11 -05:00
steve-chavez
426637a47c
Fix circleci golang docker image
...
Upgrade golang otherwise ghr throws:
unrecognized import path "math/bits"
2020-04-03 11:22:11 -05:00
Steve Chavez and GitHub
ababf7d4fa
Change docker image to support scram-sha-256 auth ( #1467 )
...
Debian stretch has a libpq < 10: https://packages.debian.org/stretch/libpq5 .
But buster has libpq >= 10 https://packages.debian.org/buster/libpq5 .
Fixes https://github.com/PostgREST/postgrest/issues/1443 .
2020-04-01 10:14:00 -05:00
691bb5640d
Allow multiple schemas to be exposed in one instance ( #1450 )
...
The schema to use can be selected through the headers `Accept-Profile` for GET/HEAD and `Content-Profile` for POST/PATCH/PUT/DELETE.
This is based on the https://www.w3.org/TR/dx-prof-conneg/ttps://www.w3.org/TR/dx-prof-conneg/ spec.
Also increase all memory tests by 1M(otherwise CI fails).
Co-authored-by: Mahmoud Kassem <MKassem@gk-software.com >
Co-authored-by: Mahmoud Kassem <mahmoud_k@mail.com >
2020-03-30 14:04:20 -05:00
Wolfgang Walther and GitHub
a80eb2ff0e
Add docker-compose file to run tests ( #1463 )
2020-03-24 09:50:06 -05:00
Duncan Ogilvie and GitHub
fe59f9bedf
Improve command line help ( #1465 )
...
Make jwt-secret explicit about 32 characters minimum.
2020-03-21 18:44:08 -05:00
Steve Chavez and GitHub
0f8838623b
Fix empty headers being added on POST/PATCH/DELETE ( #1458 )
2020-03-13 11:02:38 -05:00
Robert and GitHub
5b5945e427
Update configurator-pg to 0.2.0 (better error messages) ( #1457 )
...
* Don't indent first line of configuration parser error messages
configurator-pg returns multi-line errors now. Alternatively,
we could indent all the lines.
2020-03-12 10:04:44 -05:00
Robert Vollmert and Steve Chavez
dea57bd1be
Raise lower bound for configurator-pg.
...
Building on GHC 8.8.3 requires the MonadFail instance that 0.1.0.6
provides.
2020-03-09 13:06:27 -05:00
Robert Vollmert and Steve Chavez
3e81a38438
Relax upper bounds for GHC 8.8.3 / stackage lts-15.3.
...
Specifically, allow base 4.13 which ships with GHC 8.8, as well
as several dependency updates including hasql-transaction 1.0,
swagger 2.5 and warp 3.3.
2020-03-09 13:06:27 -05:00
Robert Vollmert and Steve Chavez
dfdf3d30b3
Fix test typo.
2020-03-07 13:04:17 -05:00
Robert Vollmert and Steve Chavez
60b64d3e81
Upgrade hspec-wai dependency to 0.10.
2020-03-07 13:04:17 -05:00
Robert Vollmert and Steve Chavez
962fba4d16
Update stack.yaml.lock for HSYaml extra-deps.
2020-03-07 13:04:17 -05:00
steve-chavez
de218e900b
Fix for sylish-haskell
2020-02-21 13:30:30 -05:00
steve-chavez
b75e7cef90
Change server-proxy-uri 2 openapi-server-proxy-uri
...
The server-proxy-uri config option mislead into thinking it was a
web server global setting when it's only related to OpenAPI.
2020-02-02 15:23:32 -05:00
steve-chavez
9b1224827a
Allow overriding headers Location,Content-Type,etc
2020-01-21 12:28:05 -05:00
steve-chavez
c7f78fa7fc
Add response.headers on GET/POST/PATCH/PUT/DELETE
2020-01-21 12:28:05 -05:00
steve-chavez
7dade7f466
Add request method and path GUCs
2020-01-21 12:28:05 -05:00
steve-chavez
b20e1150a5
Add GUC for accessing the Authorization header
2020-01-21 12:28:05 -05:00
steve-chavez
aa0d6a6831
Update BACKERS.md
2020-01-21 12:28:05 -05:00
Steve Chavez and GitHub
663faa1f82
Allow specifying the constraint name to disambiguate an embedding ( #1430 )
...
Makes previous duck typing regex unnecessary since the FK can be renamed
to a singular name or to any other format.
* Remove embedding with duck typed column names
* Allow embedding by foreign key name
* Add junction disambiguation tests
2020-01-06 09:42:33 -05:00
YUKISHITA Yohsuke and Steve Chavez
99b13fa25f
Upsert with "Prefer: resolution=merge-duplicates" on specified columns ( #1327 ) ( #1432 )
...
Allow query param 'on_conflict=key1,key2,...' to upsert with explicit columns with unique
constraint.
2019-12-29 11:52:58 -05:00
Dmitry Wagin and Steve Chavez
e12c1319b6
Change default server-unix-socket-mode 755 -> 660 ( #1423 )
2019-12-16 08:37:00 -05:00
Dmitry Wagin and Steve Chavez
7f365bf60b
Enforce singular behavior despite Prefer: return ( #1417 )
2019-12-08 01:49:20 -05:00
Dan Amoroso and Steve Chavez
2e6c78d723
add config option server-unix-socket-mode ( #1415 )
...
* added config option server-unix-socket-mode to enable custom socket permissions
* added server-unix-socket-mode input validation
2019-11-23 10:52:33 -05:00
steve-chavez
f9c64d9f65
refactor: improve disambiguation error message
...
* reverse backwards relationships
* remove redundancy from getJoinSelects
* properly name Cardinality constructors
2019-11-17 13:28:21 -05:00
steve-chavez
4ef6926791
Update authorship
2019-11-17 13:28:21 -05:00
Brian Wignall and Steve Chávez
9645f1011c
Fix double-and typo
2019-11-12 10:00:23 -05:00
steve-chavez
9847e60dca
Err embedding when multiple relationships found
...
When having one-to-many relationships like:
person -< message[sender]
person -< message[recipient]
person_detail -< message[sender]
person_detail -< message[recipient]
Where person_detail is a view of person.
This request:
GET "/message?select=*,sender(*)"
Is ambiguous. Both person or person_detail could be embedded.
Until now we have returned the first detected relationship but
now we return a 300 Multiple Choices error with a
descriptive error message asking the user to disambiguate.
This is more helpful for the user and also aids in cases of more
complex relationships.
2019-11-05 12:55:48 -05:00
steve-chavez
cb3d9ab625
refactor: rename RelationType to Cardinality
...
Remove Root type constructor
2019-11-05 12:55:48 -05:00
steve-chavez
db41fb454e
refactor: Rename synonyms to source columns
2019-11-05 12:55:48 -05:00
steve-chavez
3b133d5554
Fix #1397 , correct compression to XZ for osx bin
2019-10-24 13:12:39 -05:00
Steve Chávez and GitHub
80f763448f
Fix unique foreign key in view ( #1395 )
2019-10-16 12:45:38 -05:00
steve-chavez
a3701f5de8
Update BACKERS.md
2019-10-14 14:31:29 -05:00
steve-chavez
ed2bfc09a6
Allow PATCH/DELETE w/o Prefer when no SELECT privs
...
PATCH/DELETE can now be done without adding Prefer return=minimal when
the user doesn't have SELECT privileges.
* Also fix PATCH wrong HTTP status code
2019-10-08 12:41:39 -05:00
steve-chavez
337f821e00
refactor: remove parent embed workaround(in #647 )
...
This workaround is no more necessary since the addition of #978 .
* Also add a test for proving parent embeds offset is consistent
with other types of embeds.
2019-10-08 12:41:39 -05:00
steve-chavez
f2b126f147
refactor: Move hasql helpers to Common module
2019-10-08 12:41:39 -05:00
steve-chavez
1173bc277b
refactor: rm configSchema ref in postgrest func
...
* make TargetDefaultSpec take a schema attribute
* remove schema param from addJoinConditions
2019-10-08 12:41:39 -05:00
steve-chavez
50f2cc16ab
refactor: rm schema arg from QueryBuilder funcs
...
* Change TableName to QualifiedIdentifier in ReadQuery
and MutateQuery.
* Move removeSourceCTESchema to DbRequestBuilder.
2019-10-08 12:41:39 -05:00
steve-chavez
eebe319bfd
Recommend doing make check pre-commit
2019-09-30 08:46:31 -05:00
steve-chavez
75a42b77ea
Fix M2M resource embedding on RPC and mutations
2019-09-28 13:45:18 -05:00
steve-chavez
d71d3450af
Fix PATCH embed when not having the id in ?select
2019-09-28 13:45:18 -05:00
steve-chavez
f080159268
refactor: add the returningCols function
...
* separate fieldNames from getting fkCols
* Put binaryField inside readSqlParts
* Move scalar proc logic to binaryField
* Move logic for the "SELECT *" default to DbRequestBuilder
2019-09-28 13:45:18 -05:00
steve-chavez
0183d32c7f
refactor: Remove DbRequest type
...
This type only adds an extra constructor.
2019-09-28 13:45:18 -05:00