0

I am migrating procedures & functions from Oracle-to-Postgres. However I am facing below issue when creating function in postgres.

ERROR: schema "utl_http" does not exist LINE 5: L_HTTP_REQUEST UTL_HTTP.REQ; ^ SQL state: 3F000 Character: 303

To me it seems there should be some http extension plug-in which we are not having. Or Is there any alternative packagefor UTL_HTTP.REQ, UTL_HTTP.RESP, UTL_HTTP.HTML_PIECES, and so on.

CREATE OR REPLACE FUNCTION wallet_active ( login_session text, source_wallet text, target_wallet text, Comment text ) RETURNS varchar AS $body$
DECLARE
--Declare
    L1_HTTP_REQUEST UTL_HTTP.REQ;
    L2_HTTP_RESPONSE UTL_HTTP.RESP;

I am looking resolution of UTL_HTTP package in postgres or any alternate package.

Andronicus
  • 25,419
  • 17
  • 47
  • 88

1 Answers1

1

Perhaps you can use the pgsql-http extension, or you can write your own small function in PL/Perl - but you are advised to consider different option(s). See why you should not send emails from your trigger.

IVO GELOV
  • 13,496
  • 1
  • 17
  • 26