Re: pg_background extension help

From: Stephen Anderson <stephen(dot)anderson(at)appstech(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: pg_background extension help
Date: 2019-03-06 09:56:19
Message-ID: CADn1m+4BAk6YN=gtxfEg6bLoy2DLxVf5i=qskiZOfrAaurR6fA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thanks Tom, I've tried contacting Vibhor but had no luck. With further
digging it seems that not much at all comes back from the
pg_background_result function. I've written a wrapper function around the
call that saves the output parameter values into a local table so they can
be retrieved by the calling routine. it's ugly but it works :-)

Steve.

On Wed, 6 Mar 2019 at 02:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> 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

Browse pgsql-novice by date

  From Date Subject
Next Message mcassell 2019-03-08 13:28:27 Windows Service Stops Responding
Previous Message Tom Lane 2019-03-05 15:00:08 Re: pg_background extension help