Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqZHX-0003af-Df for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jul 2019 08:39:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hqZHW-0002Yi-2p for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jul 2019 08:39:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqZHV-0002Yb-P5 for pgsql-bugs@lists.postgresql.org; Thu, 25 Jul 2019 08:39:21 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqZHT-0006ii-O6 for pgsql-bugs@lists.postgresql.org; Thu, 25 Jul 2019 08:39:21 +0000 Received: by mail-ed1-x541.google.com with SMTP id p15so49443460eds.8 for ; Thu, 25 Jul 2019 01:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uZQzSQmuavUWsb583xiMWBQdHVjEkjAF+Z7V1KF7wXM=; b=Kb+9gD6SR+OCxoLEe4M52B3fmWvcWsSKypkPWqHAiX6otdg3iQIKP3PNXt8t2Jf6ol tgni9rf969p8ye/6YF7eFIN5ffFNK98/oWjZDJJ2uDVUiWqnm3OXi48iea7XQ1La94dy Dbbz1f69UdOeVx3dhjOa9EnXoIiOosfKFQWRDavk1vFfNLwwgnXPXfeenzucGX09dM31 LljdGnneuUYwSVCAMgKwnHeWqG8Vyc7dB9aXgUjlje/x6Vaw0rka3spLn4HXTzGIRasK 0H4Hl8A7nso1y/3MbaUS7rWOcWQqcfFyJRBLvfW5slhN3M+UfM3fHiXdvmhYZP9mX+O5 /u6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uZQzSQmuavUWsb583xiMWBQdHVjEkjAF+Z7V1KF7wXM=; b=OgKy+M6rtTiw8l0hydUg38O/anuVFtm1kqsdk7EqjPbj0Ng99sUYr+8qaZhfetfpjA +spiw8NG9/e8Fw3abpL9NW2p7mUu3GKX9eg32FsnwR6limQJByHuPW0T03oM3N4TWuoa 8IHZyW066o4ip9FAGMlzapWnM42OOINXRlrIY6xRf40fMYBSoEWz+Bgd2z0lZIf/inJR ikJshOQW+w4lSbKdMAk5xYGLQBIRlvm0LlAiIJSzzbZjFoJ7t01o9ckUgpRSSxl5tJFe MNN9RmMXEnwIB3+k+6hAXqvI4FpCHoRVGJ5KRy/jcEo21eqcWXY9D7kTJWCjeadqnzXG 1MoA== X-Gm-Message-State: APjAAAX6cUoOir6IXIeO/LR93UVtR8SddapsYzgClMF6Ir6cXhBv0w/0 uEo+yqgvZL2c5WzWLjvQnsk= X-Google-Smtp-Source: APXvYqw/P0JlaU2SH4Zzb3F43JmghtKLlUQwAK/Xxeqd0QaHQRLVb6niGsjfp44yzt6kBTiHzXIYIg== X-Received: by 2002:a05:6402:1446:: with SMTP id d6mr76855763edx.37.1564043957088; Thu, 25 Jul 2019 01:39:17 -0700 (PDT) Received: from hollewijn.internal (217-19-30-105.dsl.cambrium.nl. [217.19.30.105]) by smtp.gmail.com with ESMTPSA id m4sm7021718ejo.50.2019.07.25.01.39.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 01:39:16 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Request for resolution || Support From: Alban Hertroys In-Reply-To: Date: Thu, 25 Jul 2019 10:39:15 +0200 Cc: Thomas Munro , "David G. Johnston" , pgsql-general@postgresql.org, "pgsql-bugs@lists.postgresql.org" , Michael Paquier , suchita.dudeja@wipro.com, himanshu.jayaswal1@wipro.com Content-Transfer-Encoding: quoted-printable Message-Id: <337C49E7-250C-4D94-BD82-2CCDE2EFAA00@gmail.com> References: To: jay chauhan X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On 24 Jul 2019, at 10:08, jay chauhan = wrote: >=20 > Hi Thomas, David/Team, >=20 > Thanks you for your response. However we need your confirmation = whether my Error/issue as mentioned below will be resolved if we upgrade = our PostgreSQL Version. It won=E2=80=99t, you are talking about Oracle-specific features. You = need to change the code. PostgreSQL is not Oracle, some features are = quite RDBMS-specific. > <> > David response: Use a newer version > Tomas response: Yeah, you should use release 11 for a new project. =20 >=20 > My Issue while migrating procedure/function from Oracle to PostgreSQL: > Error-1)=20 > ERROR: cannot begin/end transactions in PL/pgSQL > HINT: Use a BEGIN block with an EXCEPTION clause instead. > CONTEXT: PL/pgSQL function = icmsuatnew.eload_commission_payout_active(text,text,text,text,text,text) = line 486 at SQL statement > SQL state: 0A000 > David Response on it : Rewrite your code as instructed How to handle these depends on your use of sub-transactions, but the = HINT gives a pretty good general approach. > Error-2) > ERROR: schema "utl_http" does not exist > LINE 38: L_HTTP_REQUEST UTL_HTTP.REQ; > ^ > SQL state: 3F000 > Character: 1785 > Thomas response: That's an Oracle thing for doing HTTP requests from = PL/SQL. To do that from plpgsql you could try an extension like this = one: > https://github.com/pramsey/pgsql-http > Or you could write your own function in Python or favourite PL>. That's what I'd probably do. > https://www.postgresql.org/docs/11/plpython-funcs.html Initiating TCP/IP from the database means that a database process needs = to wait for a response. In the meantime, it cannot do anything else. = You=E2=80=99re effectively blocking it for other transactions and = keeping that particular transaction =E2=80=98waiting in transaction=E2=80=99= until, in the worst case, a time-out. That means that no maintenance = can be done on records touched by this transaction, which can lead to = bloat. This is generally considered a bad idea, at least in this community. = You=E2=80=99re usually better off handing the connection over to an = external process that reports back to the database when appropriate. The exception to that is if your transaction cannot be allowed to commit = without a response from the other peer. In such cases it is appropriate = to use plpython, plperl, etc All that said, I am talking about PostgreSQL here. If you=E2=80=99re = instead using EnterpriseDB, which does have an Oracle compatibility = layer that could perhaps support these features (I don=E2=80=99t know), = you should talk to the EnterpriseDB guys. Alban Hertroys -- There is always an exception to always.