Text type function

From: Yuri Yurchenko <stf(at)hawk(dot)gu(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Text type function
Date: 1999-01-20 10:19:35
Message-ID: 36A5ADB6.8D8BEC93@hawk.gu.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 Jackson, DeJuan 1999-01-20 15:25:53 RE: [SQL] Beginner question - select with multiple tables
Previous Message Herouth Maoz 1999-01-20 10:11:27 Re: [SQL] set type and in clause