1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Second attempt at organizing jsonpath operators and methods

Second attempt at 283a95da92.  Since we can't reorder the enum values
of JsonPathItemType, instead reorder the switch cases where they are
used to generally follow the order of the enum values, for better
maintainability.
This commit is contained in:
Peter Eisentraut
2024-01-03 21:56:41 +01:00
parent 0958f8f6bf
commit 59fd390d5e
3 changed files with 301 additions and 294 deletions

View File

@ -49,6 +49,13 @@ DatumGetJsonPathPCopy(Datum d)
/*
* All node's type of jsonpath expression
*
* These become part of the on-disk representation of the jsonpath type.
* Therefore, to preserve pg_upgradability, the order must not be changed, and
* new values must be added at the end.
*
* It is recommended that switch cases etc. in other parts of the code also
* use this order, to maintain some consistency.
*/
typedef enum JsonPathItemType
{