pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Céline Rivière <cr@fr.netcentrex.net>
To: pgsql-sql@postgresql.org
Subject: Stored procedures returning TEXT
Date: Thu, 28 Feb 2002 15:44:31 +0100
Message-ID: <0b7101c1c066$6ec1b3f0$c7a638d5@fr.netcentrex.net> (raw)

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

Message-ID: <0b7101c1c066$6ec1b3f0$c7a638d5@fr.netcentrex.net>
Permalink:  ../0b7101c1c066$6ec1b3f0$c7a638d5@fr.netcentrex.net/
Also on:    postgresql.org/message-id/0b7101c1c066$6ec1b3f0$c7a638d5@fr.netcentrex.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cr@fr.netcentrex.net
  Subject: Re: Stored procedures returning TEXT
  In-Reply-To: <0b7101c1c066$6ec1b3f0$c7a638d5@fr.netcentrex.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