postgrest icon indicating copy to clipboard operation
postgrest copied to clipboard

feat: add more config examples to CLI

Open taimoorzaeem opened this issue 9 months ago • 5 comments

Closes #3248.

taimoorzaeem avatar May 03 '24 19:05 taimoorzaeem

@wolfgangwalther Hmm, I have noticed an inconsistency between docs and dbSettingsNames. The dbSettingsNames include db_tx_end but the docs configuration page says that db_tx_end is n/a for in-db config. More the dbSettingsNames include raw_media_types but there is no detail available around this config in the documentation.

taimoorzaeem avatar May 11 '24 08:05 taimoorzaeem

The dbSettingsNames include db_tx_end but the docs configuration page says that db_tx_end is n/a for in-db config.

A good catch. I added it in aef29d49.

More the dbSettingsNames include raw_media_types but there is no detail available around this config in the documentation.

We removed raw-media-types in v12.0.0 and replaced it with aggregation / media handlers. Removed the left-over in c6f152f5.

wolfgangwalther avatar May 12 '24 09:05 wolfgangwalther

Please rebase, solving conflicts with CHANGELOG.md.

wolfgangwalther avatar May 12 '24 09:05 wolfgangwalther

Hm, the newly added env vars and db options look hard to maintain.

I'm thinking we should somehow auto-generate them.

Also the in-db config format is not really future-proof as we're transitioning to a pre_config function: https://postgrest.org/en/v12/references/configuration.html#in-database-configuration

steve-chavez avatar May 21 '24 23:05 steve-chavez

Hm, the newly added env vars and db options look hard to maintain.

I'm thinking we should somehow auto-generate them.

That's a good idea, we could use a sample configuration and the function used to detect valid in-db configs. Although I believe that it would be a bit tricky to implement (perhaps in another PR?).

Also the in-db config format is not really future-proof as we're transitioning to a pre_config function: https://postgrest.org/en/v12/references/configuration.html#in-database-configuration

Hmm... then maybe printing a sample function instead of modifying a role would be the best here? or maybe both?

laurenceisla avatar May 21 '24 23:05 laurenceisla