Skip to content

Conversation

@plcplc
Copy link
Contributor

@plcplc plcplc commented Dec 21, 2023

What

This PR adds support for introspecting prefix-functions (i.e. functions which are not infix operators) as comparison operators.

How

There are a myriad of functions defined in Postgres that have a type compatible with that of a comparison operator, but which are not useful as such, or which are simply prefix-function versions of the more well know infix operators.

For instance, has_schema_privilege (et. al.) interrogates the server's user authorization rules, and texteq is simply (=) specialized to the text type.

Since we don't want to clutter up the default introspected metadata with at best useless and at worst insecure functions we provide the new configuration option introspectPrefixFunctionComparisonOperators which lists out the functions that will be selected for introspection. By default this list includes various functions on builtin Postgres types and the types of PostGIS.

@plcplc plcplc requested a review from soupi December 21, 2023 11:54
@plcplc plcplc marked this pull request as ready for review December 21, 2023 11:55
@plcplc plcplc enabled auto-merge December 21, 2023 11:55
@plcplc plcplc added this pull request to the merge queue Dec 21, 2023
Merged via the queue into main with commit b1071e9 Dec 21, 2023
@plcplc plcplc deleted the plc/issues/NDAT-992-prefix-function-introspection branch December 21, 2023 12:18
@plcplc plcplc mentioned this pull request Dec 21, 2023
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.

2 participants