简体   繁体   English

如何将Java函数转换为Postgresql函数

[英]How to convert Java function to postgresql function

I have oracle function which I want to convert into PostgreSQL below I am mentioning the oracle function. 我有要在下面转换为PostgreSQL的oracle函数,我提到了oracle函数。

create or replace
FUNCTION             "BOMQTYON" (M_Product_ID NUMBER, M_Warehouse_ID NUMBER,
        M_Locator_ID NUMBER, LocatorType VARCHAR2)
    RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'org.compare.sqlj.Product.bomQtyOnHold(int,int,int,java.lang.String) return java.math.BigDecimal';

I tried to create a function in PostgreSQL but it given me error on language JAVA does not exists 我试图在PostgreSQL中创建一个函数,但是它给我语言JAVA上的错误不存在

You will have to rewrite your function in one of the server programming languages on PostgreSQL. 您将不得不使用PostgreSQL上的一种服务器编程语言来重写函数。

Apart from the usual suspects PL/pgSQL and PL/Perl, you could consider using PL/Java , but you'll have to build it yourself, and don't expect that you can just reuse your Oracle code without modifications. 除了通常的可疑PL / pgSQL和PL / Perl外,您可以考虑使用PL / Java ,但是您必须自己构建它,并且不要指望您可以在不做任何修改的情况下重用Oracle代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM