Re: plperl and inline functions -- first draft

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Joshua Tolley <eggyknap(at)gmail(dot)com>
Cc: Alexey Klyukin <alexk(at)waki(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: plperl and inline functions -- first draft
Date: 2009-11-18 03:46:31
Message-ID: 4B036E17.1060402@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joshua Tolley wrote:
> + plperl_call_data *save_call_data = current_call_data;
> + bool oldcontext = trusted_context;
> +
> + if (SPI_connect() != SPI_OK_CONNECT)
> + elog(ERROR, "could not connect to SPI manager");
>
...
> + current_call_data = (plperl_call_data *) palloc0(sizeof(plperl_call_data));
> + current_call_data->fcinfo = &fake_fcinfo;
> + current_call_data->prodesc = &desc;
>

I don't think this is done in the right order. If it is then this
comment in plperl_func_handler is wrong (as well as containing a typo):

/*
* Create the call_data beforing connecting to SPI, so that it is not
* allocated in the SPI memory context
*/

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-18 03:51:26 Re: Very bad FTS performance with the Polish config
Previous Message Euler Taveira de Oliveira 2009-11-18 03:39:59 magic block in doc functions