Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group