Re: Help with SPI...

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Cristian Prieto <cristian(at)clickdiario(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with SPI...
Date: 2005-08-31 04:28:36
Message-ID: 20050831042836.GA95384@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 30, 2005 at 01:28:11PM -0600, Cristian Prieto wrote:
> Well, the new value is really the content of a memory segment, I
> know I could store it again using SPI and an UPDATE statement, but
> that means that I need to transform the val value into a string,
> and I don't know the length of the string with the scape characters
> added.

You could use SPI_prepare() and SPI_execp() without having to
transform the bytea value into a string; see the SPI documentation
and look around for examples that use numbered parameters ($1, $2,
etc.).

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2005-08-31 04:43:19 Re: optimum settings for dedicated box
Previous Message Alvaro Herrera 2005-08-31 04:04:02 Re: Planner create a slow plan without an available index