Custom Postgres Method in Labkey Query

LabKey Support Forum (Inactive)
Custom Postgres Method in Labkey Query chetc (LabKey Support)  2021-04-14 07:06
Status: Closed
 

Hello,

My apologies, I stated that this was not possible. That is not true, there is a way to create and enable custom database functions. It's not as straightforward as writing a query in the schema browser but involves adding a pass through method in a Java module. Take a look at the link below.

https://github.com/LabKey/platform/blob/aa7e89ca1446b5e797a993bfb6ace04137557a99/api/src/org/labkey/api/query/QueryService.java#L494

Note: This must be done with caution as they become available server-wide, so they need to be safe enough to be allowed in any LabKey SQL query.

Thanks,
Chet