Re: pg_background extension help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Anderson <stephen(dot)anderson(at)appstech(dot)com(dot)au>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: pg_background extension help
Date: 2019-03-05 15:00:08
Message-ID: 18453.1551798008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Stephen Anderson <stephen(dot)anderson(at)appstech(dot)com(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Stephen Anderson 2019-03-06 09:56:19 Re: pg_background extension help
Previous Message Stephen Anderson 2019-03-05 05:45:15 pg_background extension help