quick server c question

Поиск
Список
Период
Сортировка
Искать

quick server c question

От:
Laurette Cisneros <laurette@nextbus.com>
Дата:

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

FAQ