simple C function - Mailing list pgsql-general

From M.Mazurek@poznan.multinet.pl
Subject simple C function
Date
Msg-id Pine.LNX.4.21.0005191750320.8816-100000@yoyo.poznan.mtl.pl
Whole thread Raw
Responses Re: simple C function
List pgsql-general
Hi,
I'm trying to write a simple C function:

char *pg_crypt (char *pass) {
    char *salt="xyz";
        char *res;
    res = (char *) palloc(14);
    res=crypt(pass,salt);
    return res;
}

CREATE FUNCTION pg_crypt(text) RETURNS text as
'/home/mazek/pgsql/pg_crypt.so' LANGUAGE  'c';

psql just got stuck and I can't even DROP this function, because psql
hangs. Can You give me a hint me where should I look for errors. How to
get rid of this function without reinitializing $PGDATA and destroying
other data (accordind to former discussion:) ).
 LINUX RH6.2,PG 7.0

Marcin Mazurek

--
administrator
MULTINET SA o/Poznan
http://www.multinet.pl/


pgsql-general by date:

Previous
From: Richard Smith
Date:
Subject: beginner Table data type question
Next
From: Michael Ma
Date:
Subject: Why is the JDBC driver re-arranged?