Re: Calling 'c' function from PostGreSQL - Mailing list pgsql-novice

From Tom Lane
Subject Re: Calling 'c' function from PostGreSQL
Date
Msg-id 4432.987179744@sss.pgh.pa.us
Whole thread Raw
In response to Calling 'c' function from PostGreSQL  ("Atul" <atulk@newgen.co.in>)
List pgsql-novice
"Atul" <atulk@newgen.co.in> writes:
> text* myfunc()
> {
>  text* ch;
>  *ch = '1,2';
>  return ch;
> }

You can't create a text object that way.  Read some of the text-mashing
functions in the existing backend code for examples of creating a text
value correctly.  (And pay more attention to the complaints that your
C compiler undoubtedly gave you...)

            regards, tom lane

pgsql-novice by date:

Previous
From: Pete Jewell
Date:
Subject: Re: What is it?
Next
From: Tom Lane
Date:
Subject: Re: Buggy SELEC ... FROM UPDATE ?