Re: Calling 'c' function from PostGreSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Atul" <atulk(at)newgen(dot)co(dot)in>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Calling 'c' function from PostGreSQL
Date: 2001-04-13 16:35:44
Message-ID: 4432.987179744@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Atul" <atulk(at)newgen(dot)co(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-04-13 17:08:39 Re: Buggy SELEC ... FROM UPDATE ?
Previous Message Pete Jewell 2001-04-12 16:50:17 Re: What is it?