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: (view raw, whole thread or download thread mbox)
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-2017 The PostgreSQL Global Development Group