From: Yuri Yurchenko <stf@hawk.gu.net>
To: pgsql-sql@postgresql.org
Subject: Text type function
Date: Wed, 20 Jan 1999 12:19:35 +0200
Message-ID: <36A5ADB6.8D8BEC93@hawk.gu.net> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: stf@hawk.gu.net
Subject: Re: Text type function
In-Reply-To: <36A5ADB6.8D8BEC93@hawk.gu.net>
References: <36A5ADB6.8D8BEC93@hawk.gu.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox