Re: ERROR: Memory exhausted in AllocSetAlloc(909324558) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ERROR: Memory exhausted in AllocSetAlloc(909324558)
Date
Msg-id 12536.992111810@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: Memory exhausted in AllocSetAlloc(909324558)  (darcy@druid.net (D'Arcy J.M. Cain))
Responses Re: ERROR: Memory exhausted in AllocSetAlloc(909324558)  (darcy@druid.net (D'Arcy J.M. Cain))
List pgsql-hackers
darcy@druid.net (D'Arcy J.M. Cain) writes:
> Do I have to manually create a varlena?  I'll try that next.

The best way to get from a C string to a valid datum is to invoke the
datatype's input conversion routine.  If you know you want text,
you could do

#define _textin(str) DirectFunctionCall1(textin, CStringGetDatum(str))

to produce a datum from a C string.
        regards, tom lane


pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: ERROR: Memory exhausted in AllocSetAlloc(909324558)
Next
From: Vince Vielhaber
Date:
Subject: Re: grant and SQL92