quick server c question

From: Laurette Cisneros <laurette(at)nextbus(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: quick server c question
Date: 2001-08-20 22:57:18
Message-ID: Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql


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 string is 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

Browse pgsql-admin by date

  From Date Subject
Next Message Lamar Owen 2001-08-21 00:21:08 Re: Re: upgrading RPM query
Previous Message Chris Cameron 2001-08-20 19:10:28 Multiple Servers

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-08-20 23:44:55 Re: Simple SQL-syntax
Previous Message Josh Berkus 2001-08-20 22:06:45 Re: Simple SQL-syntax