quick server c question - Mailing list pgsql-admin

From Laurette Cisneros
Subject quick server c question
Date
Msg-id Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com
Whole thread Raw
List pgsql-admin
Hi all,

My c is rusty and you are all pros!...so...

I want to write a server routine that will return a string so that when "SELECT retstr() from tbl;" is executed this
stringis returned. 

What's the best way to do this?

i.e.

create:

CREATE FUNCTION retstr() RETURNS char???
  AS '/tmp/tst.so' LANGUAGE 'c';

c code:

#include postgres.h
char *  ????
 retstr()
{
    do something
    return string;
}

Thanks for the help,

--
Laurette


pgsql-admin by date:

Previous
From: Lamar Owen
Date:
Subject: Re: Re: upgrading RPM query
Next
From: Lamar Owen
Date:
Subject: Re: Re: upgrading RPM query