Am Mon, 18 Feb 2008 14:15:14 -0500
schrieb Tom Lane <[EMAIL PROTECTED]>:
> Stefan Niantschur <[EMAIL PROTECTED]> writes:
> > Please find below the most recent code snippet. It is mainly based
> > on examples from the pg documentation:
> > ---8< ---
> > #define GET_TEXT(cstrp) DatumGetTextP
Stefan Niantschur <[EMAIL PROTECTED]> writes:
> Please find below the most recent code snippet. It is mainly based on
> examples from the pg documentation:
> ---8< ---
> #define GET_TEXT(cstrp) DatumGetTextP(DirectFunctionCall1(textin,
> CStringGetDatum(cstrp)))
> (...)
> char *cres;
> int
Am Sun, 17 Feb 2008 14:28:18 -0500
schrieb Tom Lane <[EMAIL PROTECTED]>:
> Stefan Niantschur <[EMAIL PROTECTED]> writes:
> > Am Sun, 17 Feb 2008 09:17:08 -0500
> > schrieb Tom Lane <[EMAIL PROTECTED]>:
> >> Hardly surprising when you're printing the string into a fixed-size
> >> 8K buffer. The buf
Am Sun, 17 Feb 2008 14:28:18 -0500
schrieb Tom Lane <[EMAIL PROTECTED]>:
> Stefan Niantschur <[EMAIL PROTECTED]> writes:
> > Am Sun, 17 Feb 2008 09:17:08 -0500
> > schrieb Tom Lane <[EMAIL PROTECTED]>:
> >> Hardly surprising when you're printing the string into a fixed-size
> >> 8K buffer. The buf
Stefan Niantschur <[EMAIL PROTECTED]> writes:
> Am Sun, 17 Feb 2008 09:17:08 -0500
> schrieb Tom Lane <[EMAIL PROTECTED]>:
>> Hardly surprising when you're printing the string into a fixed-size
>> 8K buffer. The buffer overflow is smashing the stack, in particular
>> the function's return address.
Yes, I know, but the backend does not allow for a bigger buffer. Trying
> to use a 80K (char[81920])buffer did not work and returns:
> INFO: string-size : 48015
> INFO: +++
> server closed the connection unexpectedly
>This probably means the server terminated abnor
Am Sun, 17 Feb 2008 09:17:08 -0500
schrieb Tom Lane <[EMAIL PROTECTED]>:
> Stefan Niantschur <[EMAIL PROTECTED]> writes:
> > So far I have been successfully doing calls to SPI, select the data
> > from the table and return it. However, this works only with string
> > not larger than page size of c
Tom Lane wrote:
Stefan Niantschur <[EMAIL PROTECTED]> writes:
So far I have been successfully doing calls to SPI, select the data from the
table and return it. However, this works only with string not larger than
page size of char[8192].
The strings I expect are much longer and this causes the
Stefan Niantschur <[EMAIL PROTECTED]> writes:
> So far I have been successfully doing calls to SPI, select the data from the
> table and return it. However, this works only with string not larger than
> page size of char[8192].
> The strings I expect are much longer and this causes the backend to
Hi all,
I want to write a function in C which retrieves a large string from a table,
does some work on it and returns the result to the surrounding SELECT.
(e.g. SELECT my_c_func(text);)
So far I have been successfully doing calls to SPI, select the data from the
table and return it. However,
10 matches
Mail list logo