Commit Graph
3803 Commits
Author SHA1 Message Date
Wolfgang WaltherandWolfgang Walther 0b0b4f2a79 ci: Update cirrus' freebsd image to 14.1
This should fix CI which is failing lately like this:
https://cirrus-ci.com/task/4665005218463744

ld-elf.so.1: /lib/libc.so.7: version FBSD_1.8 required by
/usr/local/bin/stack not found
2024-10-26 14:51:13 +02:00
renovate[bot]andWolfgang Walther 994b60a187 chore(deps): update actions/cache action to v4.1.2 2024-10-24 05:15:43 +02:00
renovate[bot]andWolfgang Walther 64f7f1451a chore(deps): update actions/upload-artifact action to v4.4.3 2024-10-24 05:15:06 +02:00
renovate[bot]andWolfgang Walther 204ae996a3 chore(deps): update actions/checkout action to v4.2.2 2024-10-24 05:09:39 +02:00
renovate[bot]andWolfgang Walther 719cadf14b chore(deps): update codecov/codecov-action action to v4.6.0 2024-10-24 05:06:21 +02:00
renovate[bot]andWolfgang Walther addbe5b7e2 chore(deps): update ubuntu:noble docker digest to 99c3519 2024-10-24 05:04:28 +02:00
steve-chavez bee862c2fa docs: inline one-to-one relationship SQL
More direct than having to jump to the sample film database definition.
2024-10-21 14:45:53 -05:00
Dan KurinandSteve Chavez 5ca969f4b8 docs: add PGRST123 to error table 2024-10-17 19:21:07 -05:00
steve-chavez 28ebe37e07 docs: example for server-host 2024-10-07 17:14:43 -05:00
Wolfgang Walther db5cbab3d5 docs: Remove broken link
https://github.com/PostgREST/postgrest/actions/runs/11136795565/job/30949162312
2024-10-04 16:02:08 +02:00
steve-chavez 7e99babec7 feat: log pool maximum size
It's important for observability to have an historic trace of the pool
size. Currently we expose it on the metrics endpoint, but not all
deployments use it.

This logs the pool size after the successful connection log to make it
more visible:

<timestamp>: Connection Pool initialized with a maximum size of 4 connections
2024-10-02 22:47:22 -05:00
steve-chavez 87dddd66d2 fix: clarify "listening" logs
It's not immediately clear on which port the API server is listening.
Also it's not clear that the "pgrst" channel is for database
notifications.

Goes from:

<timestamp>: Admin server listening on 0.0.0.0:3001
<timestamp>: Listening on 0.0.0.0:3000
<timestamp>: Listening for notifications on the "pgrst" channel

To:

<timestamp>: Admin server listening on 0.0.0.0:3001
<timestamp>: API server listening on 0.0.0.0:3000
<timestamp>: Listening for database notifications on the "pgrst" channel
2024-10-02 22:47:22 -05:00
renovate[bot]andWolfgang Walther bfbd033c6e chore(deps): update ubuntu:noble docker digest to dfc1087 2024-09-18 20:01:51 +02:00
renovate[bot]andWolfgang Walther a064d0df94 chore(deps): update dependency urllib3 to v2.2.3 2024-09-12 21:00:50 +02:00
Andrei DziahelandWolfgang Walther c2513c8861 ci: drop directories from windows release
Puts windows release in line with others which have the executable on the top level
2024-09-11 19:22:37 +02:00
renovate[bot]andWolfgang Walther 678103bbfa chore(deps): update actions/upload-artifact action to v4.4.0 2024-09-04 13:29:49 +02:00
Jason Closeandsteve-chavez f21053dbee docs: rpc example for array of json objects
This change adds an explanation of how to handle an array of JSON objects within an RPC call.  To pass multiple objects, an array of JSON objects must be the JSON value, with the key being the json or jsonb variable name of the Postgres function.

For people who want to perform multiple tasks/inserts/updates within a single API call, this is a needed explanation for that use-case.
2024-08-23 13:01:43 -05:00
Laurence Isla ded2e997e9 fix: spread embeds failing when using the "count()" aggregate without a field - @laurenceisla
- Fixed "column reference <col> is ambiguous" error when selecting "?select=...table(col,count())"
- Fixed "column <json_aggregate>.<alias> does not exist" error when selecting "?select=...table(aias:count())"
2024-08-21 16:56:32 -05:00
Laurence Isla 2302f78539 refactor: simplify functions in the "hoist from selected fields" process 2024-08-21 16:56:32 -05:00
Laurence Isla e9244f1a4f fix: a nested spread embedding now correctly groups by the fields of its top parent relationship 2024-08-21 16:56:32 -05:00
Laurence Isla 3539aaff89 fix: prevent spread embed to use aggregates when disabled 2024-08-21 16:56:32 -05:00
renovate[bot]andWolfgang Walther 9a079607dd chore(deps): update haskell-actions/setup action to v2.7.6 2024-08-18 14:04:19 +02:00
renovate[bot]andWolfgang Walther 07febf41cc chore(deps): update ubuntu:noble docker digest to 8a37d68 2024-08-18 14:04:05 +02:00
renovate[bot]andLaurence Isla a9ba148373 chore(deps): update actions/upload-artifact action to v4.3.6 2024-08-13 13:25:55 -05:00
renovate[bot]andWolfgang Walther 6c7963c1c4 chore(deps): update actions/upload-artifact action to v4.3.5 2024-08-02 21:07:32 +02:00
closeobserveandWolfgang Walther 6b11332d6d chore: fix some comments 2024-08-02 09:01:15 +02:00
steve-chavez cccf8b750d docs: rename to hoisted function settings 2024-08-01 19:17:56 -05:00
Wolfgang Walther 7af8f8175a changelog: Add 12.2.3 2024-08-01 18:56:36 +02:00
Andrei DziahelandGitHub 46537879ae feat: Add resolved host to "Listening on ..." messages (#3560)
This adds resolved host's IP to "Listening on ..." messages emitted when
app and admin servers start.
2024-08-01 11:31:35 -05:00
Laurence Isla 48edab24c6 changelog: add missing entry for 3670 2024-08-01 11:17:01 -05:00
7c74f6cf0a fix: schema cache loading before the in-db config (#3670)
Fixes #3660. Load the config after getting the pg version but before loading the schema.

The regression happened on f09655b.

Also remove schema cache load wrapper and separate db queries in different functions.

Co-authored-by: Laurence Isla <lau.isla.c@gmail.com>
2024-08-01 10:37:48 -05:00
Dan KurinandGitHub b261abd5f5 fix: Remove OpenAPI format for rowFilter params (#3661) 2024-07-16 11:13:47 -05:00
Wolfgang WaltherandWolfgang Walther d7da18147b refactor: Simplify pks_uniques_cols 2024-07-13 22:26:36 +02:00
Wolfgang WaltherandWolfgang Walther 50bdb6a3de fix: Embed One-to-One relationship with different column order properly 2024-07-13 22:26:36 +02:00
Wolfgang Walther 9d9233b061 chore: Adjust changelog after v12.2.2 release 2024-07-13 17:17:00 +02:00
steve-chavez ce7ef3b188 chore: remove links to gitter
We'll now use github discussions for support.
2024-07-12 14:30:28 -05:00
Salim BandWolfgang Walther 1452720be6 fix: update OpenAPI externalDocs URL
fixes https://github.com/PostgREST/postgrest/issues/3091
2024-07-11 15:07:14 +02:00
steve-chavez 6be59066df fix: schema cache retrying without backoff
Fixes https://github.com/PostgREST/postgrest/issues/3523.

Now if there's a failure when obtaining the pg version OR schema cache,
we do the same retrying process. This way we don't add two retries.

Refactors and renames the "connectionWorker" to "schemaCacheLoader".
This makes more sense since what we really want is the schema cache,
the version is the pre-requisite for ensuring our
schema cache queries work.

Additionally, we no longer log ` Attempting to connect to the database...`
at startup unnecessarily. This is only logged whenever there's a retry attempt.
2024-07-10 21:14:24 -05:00
Wolfgang Walther 03111cedbf refactor: Fix typo in QueryBuilder
Signed-off-by: Wolfgang Walther <walther@technowledgy.de>
2024-07-10 22:16:17 +02:00
Wolfgang Walther 3e7c130a0d test: Reorganize upsert tests matching contexts
Signed-off-by: Wolfgang Walther <walther@technowledgy.de>
2024-07-10 21:22:28 +02:00
Wolfgang WaltherandWolfgang Walther b135d9b438 test: Raise limit for memory tests 2024-07-09 18:35:29 +02:00
Wolfgang Walther 889a3450c2 chore: Remove left-over CONTRIBUTING.md from docs repo 2024-07-09 10:16:17 +02:00
Wolfgang WaltherandWolfgang Walther b598b594df refactor: Simplify schemaDescription query 2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther 86c3257f54 feat: Fail schema cache lookup with invalid db-schemas config
Previously, we'd silently report "200 OK" on the root endpoint, but
would never return any endpoints from the schema cache.

Now the schema cache query fails because of the ::regnamespace cast.
2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther f31848f2e5 refactor: Simplify funcsSqlQuery
This allows to re-use ANY($$1) in the next commit.
2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther 735e1edbf6 refactor: Simplify columns_agg 2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther 01a18d8199 fix: List correct enum options when multiple types with same name are present
The schema cache and OpenAPI output would currently list the first found
enum with the same name instead of the correct type. One other case
where this comes up is when a regular type and an enum type have the
same name. For example in the spec fixtures, we have an enum called
"bit". Every "bit" type, no matter whether it's that enum or the
built-in bit type, will show those enum options in the OpenApi output.

Not adding a test, because OpenAPI is supposed to go away in the future
anyway.
2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther 1747a4fcc4 refactor: Replace pg_namespace joins with ::regnamespace in schema cache
Less joins are much easier to read and understand.
2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther 5ea83de7ec refactor: Simplify tbl_pk_cols query 2024-07-09 08:31:31 +02:00
Wolfgang WaltherandWolfgang Walther 3daeec4e76 refactor: Make schema cache dumps more predictable with consistent ORDER
This helps diffing schema cache changes during development.
2024-07-09 08:31:31 +02:00