Quoting Adrian Klaver <adrian.klaver@xxxxxxxxxxx>:
Can you provide an outline form of what you are trying to accomplish?
Hm, making myself understood. ;-) So from the very beginning.
There is the concept of growing degree days
(https://en.wikipedia.org/wiki/Growing_degree-day). It is a measure
for energy an organism can consume in a specific day for its
development. Let stay at plants. It is basically the daily average
temperature. As plants do not grow below a certain, plant specific
temperature, this base temperature gets substracted from the average.
Usually plants grow faster the warmer it is. But only to a certain
temperature above which the growth rate remains. However, the
arithmetic temperature average is not the most accurate approximation,
so there are other methods to calculate the amount of energy available
to grow. To cut a long story short, I implemented several such methods
as pg/plsql functions. And I implement a datamodel, where plants get
connected to the amount of growing degree days to mature. As this
value is method dependent, all the plant values get the method used to
calculate it, assigned too. To prevent the assignement of imaginary
methods, I setup foreign key relation. Unfortunately, it is not
allowed to reference the catalog tables, so I put up a dimension
table. In order to prevent imaginary entries there, I want to check
the existence of the entry-to-be as installed function
(information_schema.routines). I wanted to have a general solution for
the check to facilitate reuse of the method_check trigger function.
--
S/MIME Public Key: https://oc.gelassene-pferde.biz/index.php/s/eJuAUFONag6ofnH
Signal (Safer than WhatsApp): +49 1578 7723737
Threema (Safer than WhatsApp): A76MKH3J
Handys: +41 78 947 36 21 | +49 1578 772 37 37