Re: pg_background extension help - Mailing list pgsql-novice

From Tom Lane
Subject Re: pg_background extension help
Date
Msg-id 18453.1551798008@sss.pgh.pa.us
Whole thread Raw
In response to pg_background extension help  (Stephen Anderson <stephen.anderson@appstech.com.au>)
Responses Re: pg_background extension help  (Stephen Anderson <stephen.anderson@appstech.com.au>)
List pgsql-novice
Stephen Anderson <stephen.anderson@appstech.com.au> writes:
> I'm porting over an Oracle application to postgres and by and large its
> been relatively seamless.  One of the challenges I've hit is replicating
> the functions/procedures that utilise Oracle's autonomous transaction
> functionality.  I've found Vibhor's pg_background extension (
> https://github.com/vibhorkum/pg_background) and successfully created it in
> my instance and this seems pretty damn close to what I need.  Unfortunately
> I've hit a bit of a snag around getting parameter values back.  So to the
> point of all this :-)

I know diddly-squat about pg_background, but judging from the symptoms
you mention, it's not very smart about functions declared to return
RECORD, which is what's happening under the hood if you use multiple OUT
parameters.  You might have better luck if you create a named composite
type and declare the function to return that (which'll require some
internal notational changes in the function, but nothing too awful).

Or perhaps not.  In any case, it'd be an idea to take this up with the
extension's author; maybe it can be improved in future releases.

            regards, tom lane


pgsql-novice by date:

Previous
From: Stephen Anderson
Date:
Subject: pg_background extension help
Next
From: Stephen Anderson
Date:
Subject: Re: pg_background extension help