pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedRequest for resolution || Support
8+ messages / 7 participants
[nested] [flat]
* Request for resolution || Support
@ 2019-07-21 18:53 jay chauhan <jaychauhan.src@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: jay chauhan @ 2019-07-21 18:53 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; security@postgresql.org
Dear Team,
<<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu,
compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
Good evening!
I am migrating Oracle DB into PostgreSQL. However I am facing some issue in
postgreSQL as listed below.
Error-1)
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
Error-2)
ERROR: schema "utl_http" does not exist
I need urgent help.
Thanks,
Jay Chauhan
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-21 20:48 David G. Johnston <david.g.johnston@gmail.com>
parent: jay chauhan <jaychauhan.src@gmail.com>
0 siblings, 2 replies; 8+ messages in thread
From: David G. Johnston @ 2019-07-21 20:48 UTC (permalink / raw)
To: jay chauhan <jaychauhan.src@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Please don’t pick random places to send emails. This is neither a bug nor
a security issue so neither of these lists apply. The -general list is
most appropriate.
On Sunday, July 21, 2019, jay chauhan <jaychauhan.src@gmail.com> wrote:
>
> <<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu,
> compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
>
>
Use a newer version
> Good evening!
> I am migrating Oracle DB into PostgreSQL. However I am facing some issue
> in postgreSQL as listed below.
>
> Error-1)
> 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
>
>
Rewrite your code as instructed
> Error-2)
> ERROR: schema "utl_http" does not exist
>
Insufficient data provided to even guess
> I need urgent help.
>
Maybe hire an experienced migration company then.
David J.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-21 22:23 Thomas Munro <thomas.munro@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Munro @ 2019-07-21 22:23 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: jay chauhan <jaychauhan.src@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Mon, Jul 22, 2019 at 8:49 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
> On Sunday, July 21, 2019, jay chauhan <jaychauhan.src@gmail.com> wrote:
>> <<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
>
> Use a newer version
Yeah, you should use release 11 for a new project.
https://www.postgresql.org/support/versioning/
>> Error-2)
>> ERROR: schema "utl_http" does not exist
>
> Insufficient data provided to even guess
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 <insert your
favourite PL>. That's what I'd probably do.
https://www.postgresql.org/docs/11/plpython-funcs.html
Google should help you find examples of people using plpython to
access the various Python HTTP modules.
--
Thomas Munro
https://enterprisedb.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-21 22:58 Jaime Casanova <jaime.casanova@2ndquadrant.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 8+ messages in thread
From: Jaime Casanova @ 2019-07-21 22:58 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: jay chauhan <jaychauhan.src@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
El dom., 21 de jul. de 2019 3:48 p. m., David G. Johnston <
david.g.johnston@gmail.com> escribió:
> Please don’t pick random places to send emails. This is neither a bug nor
> a security issue so neither of these lists apply. The -general list is
> most appropriate.
>
> On Sunday, July 21, 2019, jay chauhan <jaychauhan.src@gmail.com> wrote:
>>
>> <<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu,
>> compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
>>
>>
> Use a newer version
>
>
>> Good evening!
>> I am migrating Oracle DB into PostgreSQL. However I am facing some issue
>> in postgreSQL as listed below.
>>
>> Error-1)
>> 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
>>
>>
> Rewrite your code as instructed
>
Actually in postgres 11 you can begin/end transactions inside a plpgsql
stored procedure (not in a function)
--
Jaime Casanova
2ndQuadrant
Su diligente equipo de expertos en PostgreSQL
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-24 08:08 jay chauhan <jaychauhan.src@gmail.com>
parent: Thomas Munro <thomas.munro@gmail.com>
0 siblings, 3 replies; 8+ messages in thread
From: jay chauhan @ 2019-07-24 08:08 UTC (permalink / raw)
To: Thomas Munro <thomas.munro@gmail.com>; David G. Johnston <david.g.johnston@gmail.com>; pgsql-general@postgresql.org; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>; Michael Paquier <michael@paquier.xyz>; suchita.dudeja@wipro.com; himanshu.jayaswal1@wipro.com
Hi Thomas, David/Team,
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.
<<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu,
compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
*David response: *Use a newer version
*Tomas response:* Yeah, you should use release 11 for a new project.
My Issue while migrating procedure/function from Oracle to PostgreSQL:
Error-1)
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
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 <insert your
favourite PL>. That's what I'd probably do.
https://www.postgresql.org/docs/11/plpython-funcs.html
*Need your urgent help.*
Regards,
Jay Chauhan
+918802766181
On Mon, Jul 22, 2019 at 3:53 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Mon, Jul 22, 2019 at 8:49 AM David G. Johnston
> <david.g.johnston@gmail.com> wrote:
> > On Sunday, July 21, 2019, jay chauhan <jaychauhan.src@gmail.com> wrote:
> >> <<My PostgreSQL version : "PostgreSQL 9.3.4 on
> x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat
> 4.8.5-4), 64-bit">>
> >
> > Use a newer version
>
> Yeah, you should use release 11 for a new project.
>
> https://www.postgresql.org/support/versioning/
>
> >> Error-2)
> >> ERROR: schema "utl_http" does not exist
> >
> > Insufficient data provided to even guess
>
> 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 <insert your
> favourite PL>. That's what I'd probably do.
>
> https://www.postgresql.org/docs/11/plpython-funcs.html
>
> Google should help you find examples of people using plpython to
> access the various Python HTTP modules.
>
> --
> Thomas Munro
> https://enterprisedb.com
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-24 16:08 Christopher Browne <cbbrowne@gmail.com>
parent: jay chauhan <jaychauhan.src@gmail.com>
2 siblings, 0 replies; 8+ messages in thread
From: Christopher Browne @ 2019-07-24 16:08 UTC (permalink / raw)
To: jay chauhan <jaychauhan.src@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>; suchita.dudeja@wipro.com; himanshu.jayaswal1@wipro.com
On Wed, 24 Jul 2019 at 07:58, jay chauhan <jaychauhan.src@gmail.com> wrote:
> Hi Thomas, David/Team,
>
> 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.
>
No, the "issues" that you mentioned will not be automatically resolved by
upgrading to a modern version of PostgreSQL.
You will need to modify your application to use PostgreSQL facilities
properly, such as...
- Not attempting to BEGIN TRANSACTION / COMMIT WORK inside a stored
function.
Per the Fine Documentation:
https://www.postgresql.org/docs/11/plpgsql-structure.html
"Functions and trigger procedures are always executed within a transaction
established by an outer query — they cannot start or commit that
transaction, since there would be no context for them to execute in."
- ERROR: schema "utl_http" does not exist
This is a reference to some Oracle-specific thing that you would need to
reimplement in some fashion for PostgreSQL. A newer version of PostgreSQL
will not somehow draw in Oracle-proprietary features.
If you created a namespace via
create namespace utl_http;
then that particular error message would go away, but it would presumably
be replaced by some other error message as whatever it is that is missing
would still be missing.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-25 05:52 Guyren Howe <guyren@gmail.com>
parent: jay chauhan <jaychauhan.src@gmail.com>
2 siblings, 0 replies; 8+ messages in thread
From: Guyren Howe @ 2019-07-25 05:52 UTC (permalink / raw)
To: Thomas Munro <thomas.munro@gmail.com>; David G. Johnston <david.g.johnston@gmail.com>; pgsql-general@postgresql.org, jay chauhan <jaychauhan.src@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>; Michael Paquier <michael@paquier.xyz>; suchita.dudeja@wipro.com; himanshu.jayaswal1@wipro.com
Another option would be an app that is constantly connected to Postgres using LISTEN/NOTIFY.
On Jul 24, 2019, 22:34 -0700, jay chauhan <jaychauhan.src@gmail.com>, wrote:
> Hi Thomas, David/Team,
>
> 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.
>
> <<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
> David response: Use a newer version
> Tomas response: Yeah, you should use release 11 for a new project.
>
> My Issue while migrating procedure/function from Oracle to PostgreSQL:
> Error-1)
> 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
>
> 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 <insert your
> favourite PL>. That's what I'd probably do.
> https://www.postgresql.org/docs/11/plpython-funcs.html
>
>
> Need your urgent help.
>
> Regards,
> Jay Chauhan
> +918802766181
>
>
> > On Mon, Jul 22, 2019 at 3:53 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> > > On Mon, Jul 22, 2019 at 8:49 AM David G. Johnston
> > > <david.g.johnston@gmail.com> wrote:
> > > > On Sunday, July 21, 2019, jay chauhan <jaychauhan.src@gmail.com> wrote:
> > > >> <<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
> > > >
> > > > Use a newer version
> > >
> > > Yeah, you should use release 11 for a new project.
> > >
> > > https://www.postgresql.org/support/versioning/
> > >
> > > >> Error-2)
> > > >> ERROR: schema "utl_http" does not exist
> > > >
> > > > Insufficient data provided to even guess
> > >
> > > 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 <insert your
> > > favourite PL>. That's what I'd probably do.
> > >
> > > https://www.postgresql.org/docs/11/plpython-funcs.html
> > >
> > > Google should help you find examples of people using plpython to
> > > access the various Python HTTP modules.
> > >
> > > --
> > > Thomas Munro
> > > https://enterprisedb.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Request for resolution || Support
@ 2019-07-25 08:39 Alban Hertroys <haramrae@gmail.com>
parent: jay chauhan <jaychauhan.src@gmail.com>
2 siblings, 0 replies; 8+ messages in thread
From: Alban Hertroys @ 2019-07-25 08:39 UTC (permalink / raw)
To: jay chauhan <jaychauhan.src@gmail.com>; +Cc: Thomas Munro <thomas.munro@gmail.com>; David G. Johnston <david.g.johnston@gmail.com>; pgsql-general@postgresql.org, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>; Michael Paquier <michael@paquier.xyz>; suchita.dudeja@wipro.com; himanshu.jayaswal1@wipro.com
> On 24 Jul 2019, at 10:08, jay chauhan <jaychauhan.src@gmail.com> wrote:
>
> Hi Thomas, David/Team,
>
> 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’t, you are talking about Oracle-specific features. You need to change the code. PostgreSQL is not Oracle, some features are quite RDBMS-specific.
> <<My PostgreSQL version : "PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit">>
> David response: Use a newer version
> Tomas response: Yeah, you should use release 11 for a new project.
>
> My Issue while migrating procedure/function from Oracle to PostgreSQL:
> Error-1)
> 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 <insert your
> 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’re effectively blocking it for other transactions and keeping that particular transaction ‘waiting in transaction’ 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’re 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’re instead using EnterpriseDB, which does have an Oracle compatibility layer that could perhaps support these features (I don’t know), you should talk to the EnterpriseDB guys.
Alban Hertroys
--
There is always an exception to always.
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2019-07-25 08:39 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-21 18:53 Request for resolution || Support jay chauhan <jaychauhan.src@gmail.com>
2019-07-21 20:48 ` David G. Johnston <david.g.johnston@gmail.com>
2019-07-21 22:23 ` Thomas Munro <thomas.munro@gmail.com>
2019-07-24 08:08 ` jay chauhan <jaychauhan.src@gmail.com>
2019-07-24 16:08 ` Christopher Browne <cbbrowne@gmail.com>
2019-07-25 05:52 ` Guyren Howe <guyren@gmail.com>
2019-07-25 08:39 ` Alban Hertroys <haramrae@gmail.com>
2019-07-21 22:58 ` Jaime Casanova <jaime.casanova@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox