Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API périmètres - Limiter aux événements avant une date #1262

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

rik
Copy link
Member

@rik rik commented Mar 25, 2025

fix #1251

`date_iso` n'était pas un nom assez descriptif.

Comme nous n'avons pas la main sur toute les requêtes SQL, nous ne renommons que le champ Django, pas la colonne SQL. Et l'on indique que c'est une string car cela simplifiera la création d'une colonne `date_evenement` de type `date` dans le futur.

Nous aurions aimer utilisé une colonne générée mais il faut des fonctions à la volatilité `immutable`.

> The generation expression can only use immutable functions and cannot use subqueries or reference anything other than the current row in any way.
>
> https://www.postgresql.org/docs/17/ddl-generated-columns.html
>
> https://www.postgresql.org/docs/17/xfunc-volatility.html

Et nous n'avons pas trouvé de telles fonctions pour convertir un texte en date. Par exemple [`to_date`](https://github.com/postgres/postgres/blob/73eba5004a06a744b6b8570e42432b9e9f75997b/src/include/catalog/pg_proc.dat#L4765-L4767) est déclarée seulement stable.
@rik rik force-pushed the 1251_ignore_evenement_apres_date branch from 542f29b to 5a3e680 Compare March 25, 2025 18:24
@rik rik force-pushed the 1251_ignore_evenement_apres_date branch from 5a3e680 to 498936d Compare March 25, 2025 18:30
Copy link

@rik rik merged commit 248f0ce into main Mar 25, 2025
4 checks passed
@rik rik deleted the 1251_ignore_evenement_apres_date branch March 25, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API périmètres - Limiter aux événements avant une date
1 participant