Eliminate PL/pgSQL functions from petascope
|Reported by:||dmisev||Owned by:||bthapaliya|
PL/pgSQL functions are used in petascope to compute some queries. This saves some number of queries, but ties petascope to postgres, so they should be eliminated:
- identify which PL/pgSQL functions in source:applications/petascope/src/main/db/petascope/update8 (in particular in utilities.sql and macros.sql) are used in the SQL queries executed by petascope. All SQL queries are executed in DbMetadataSource, so look here to identify which (custom) functions they use.
- translate those functions to Java, so that the function call in the SQL query in DbMetadataSource is instead replaced with the result from the Java method.