Open laurenceisla opened 1 year ago
Hm, what's the need for the version?
@steve-chavez For the Info Object it's mostly to get the same result as the core repo. But it may be also needed to generate the documentarion URL (although this one needs a simplified version).
Edit: Btw I mistakenly said "PostgreSQL" version instead of "PostgREST" version.
Got it. So I guess the same problem exists for the server_proxy_uri
too:
While the schemas
can be obtained from our tx-settings
.
Maybe we need a concept of session-scoped settings on PostgREST to make this work. So each config option (coming from file or env var) gets a set_config($,$, false)
thus is always available. Unlike tx-settings this wouldn't have a perf cost impact.
What are tx-settings? I'm assuming it means transaction settings? Is this set_config within a transaction or something?
I'm assuming it means transaction settings? Is this set_config within a transaction or something?
@wayland Yes, basically set_config(.., .., true)
. We use them like mentioned on https://github.com/PostgREST/postgrest/issues/3019
We need to find a way on how to detect the PostgREST version. Maybe using this https://github.com/PostgREST/postgrest/issues/2647 could help, but if it fails it needs to be retrieved from another source.
https://github.com/laurenceisla/postgrest-openapi/blob/74430c6e72fdf745a63727020679101a50c4fd6d/src/postgrest.sql#L506-L511