Re: [GENERAL] Trouble with bytea in SPI...

2005-09-02 Thread Alvaro Herrera
On Fri, Sep 02, 2005 at 12:17:09PM -0600, Cristian Prieto wrote: Hey Cristian, > Right now it works just with one field and I guess it is working well, but > I am very worried about the performance of SPI_execute() and SPI_execp(). I > read in the Developer FAQ something about accessing the dat

Re: [GENERAL] Trouble with bytea in SPI...

2005-09-02 Thread Cristian Prieto
;Michael Fuhr" <[EMAIL PROTECTED]> Cc: "Cristian Prieto" <[EMAIL PROTECTED]>; Sent: Thursday, September 01, 2005 9:51 PM Subject: Re: [GENERAL] Trouble with bytea in SPI... Michael Fuhr <[EMAIL PROTECTED]> writes: On Thu, Sep 01, 2005 at 08:23:31PM -0600, Cristi

Re: [GENERAL] Trouble with bytea in SPI...

2005-09-01 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Thu, Sep 01, 2005 at 08:23:31PM -0600, Cristian Prieto wrote: >> Hello, I've been working just a little with SPI in a few stored >> functions, this is a model of my SP: > Please post a real example instead of a "model." Also, it's good to make at leas

Re: [GENERAL] Trouble with bytea in SPI...

2005-09-01 Thread Michael Fuhr
On Thu, Sep 01, 2005 at 08:23:31PM -0600, Cristian Prieto wrote: > Hello, I've been working just a little with SPI in a few stored > functions, this is a model of my SP: Please post a real example instead of a "model." The code you posted fails to compile, with errors and warnings like the follow

[GENERAL] Trouble with bytea in SPI...

2005-09-01 Thread Cristian Prieto
Hello, I've been working just a little with SPI in a few stored functions, this is a model of my SP:   PG_FUNCTION_INFO_V1(myspi);   Datum myspi(PG_FUNCTION_ARGS) {     bool isnull;     bytea *val;     Oid *karg;     void *plan;     int res;       ret = SPI_connect();     karg = (Oid *) pallo