pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurette Cisneros <laurette@nextbus.com>
To: pgsql-sql@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: quick server c question
Date: Mon, 20 Aug 2001 15:57:18 -0700 (PDT)
Message-ID: <Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com> (raw)


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




Message-ID: <Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com>
Permalink:  ../Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: laurette@nextbus.com, pgsql-admin@postgresql.org
  Subject: Re: quick server c question
  In-Reply-To: <Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com>
  References: <Pine.LNX.4.33.0108201553170.26805-100000@visor.corp.nextbus.com>

* 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