Repository navigation
State the element of an array of each SQL scalar: its C type and its text codec - #285
Merged
estebanzimanyi merged 1 commit intoNov 20, 2026
Conversation
…text codec sqlTypes states, on each SQL scalar whose array a signature passes or answers, the element of that array: the C type it is laid in, the element the catalog's shape.inputArrays and shape.arrayReturn state opposite the array (integer[] an int array, text[] a text * array, a Datum being no element type), and its text codec, the one typeEncodings states for it (TimestampTz, DateADT), else the one public reader and the one public writer of that C type among the io functions of the core family, their trailing inputs defaulted as _aux_specs defaults those of an in/out helper (float8_out with its maxdd). int is read as int32_t, which it is on every platform MEOS builds on. The fields every other entry states are unchanged. Why: a binding passing or answering an array of integers, booleans, numbers, dates, timestamps or texts read each element through a reader and a writer it named by hand (JMEOS's SQL_ARRAY_SCALAR), or, in MobilityNebula, which states no MEOS fact by hand, could not read the array at all. Witness: over the catalog of MobilityDB 8e99a344e6, the elements of integer (int: int32_in, int32_out), bigint (int64_t), boolean (bool), float and double precision (double: float8_in, float8_out with maxdd 15), date (DateADT), timestamptz (TimestampTz: timestamptz_in with typmod -1) and text (text *: text_in, text_out); json_in, also answering a text, is of the JSON family, and geo_typename, also writing an int, of category transformation. tests/test_sqltypes.py: 14 tests; the suite runs 753.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sqlTypes states, on each SQL scalar whose array a signature passes or answers, the element of that array: the C type it is laid in, the element the catalog's shape.inputArrays and shape.arrayReturn state opposite the array (integer[] an int array, text[] a text * array, a Datum being no element type), and its text codec, the one typeEncodings states for it (TimestampTz, DateADT), else the one public reader and the one public writer of that C type among the io functions of the core family, their trailing inputs defaulted as _aux_specs defaults those of an in/out helper (float8_out with its maxdd). int is read as int32_t, which it is on every platform MEOS builds on. The fields every other entry states are unchanged.
Why: a binding passing or answering an array of integers, booleans, numbers, dates, timestamps or texts read each element through a reader and a writer it named by hand (JMEOS's SQL_ARRAY_SCALAR), or, in MobilityNebula, which states no MEOS fact by hand, could not read the array at all.
Witness: over the catalog of MobilityDB 8e99a344e6, the elements of integer (int: int32_in, int32_out), bigint (int64_t), boolean (bool), float and double precision (double: float8_in, float8_out with maxdd 15), date (DateADT), timestamptz (TimestampTz: timestamptz_in with typmod -1) and text (text *: text_in, text_out); json_in, also answering a text, is of the JSON family, and geo_typename, also writing an int, of category transformation. tests/test_sqltypes.py: 14 tests; the suite runs 753.