Stored procedures returning TEXT

From: Céline Rivière <cr(at)fr(dot)netcentrex(dot)net>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Stored procedures returning TEXT
Date: 2002-02-28 14:44:31
Message-ID: 0b7101c1c066$6ec1b3f0$c7a638d5@fr.netcentrex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

In 1999, someone asked you about the following problem. I have exactly the
same and couldn't solve it. Could you help me ?

Thanks.

Céline

---------------------------------------------------------------------

Preinstalled postgresql-6.4.2 on Linux-Elf
Who know how write function(language 'c') which return text type?
I try
#include "postgres.h"

text test(text *t)
{
return(*t);
}
...
made test.so,
create function test(text) returns text as 'path_to_test.so' language
'c'
and finaly
pgsql
test=>select test('abc');
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally before or
while processing the request.
We have lost the connection to the backend, so further processing is
impossible. Terminating.
Anybody have some examples working text-type c-functions?
Please send me if you have

Browse pgsql-sql by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2002-02-28 15:41:10 Re: backward SQL query
Previous Message TimothyReaves 2002-02-28 13:45:25 Re: How slow is DISTINCT?