Re: Linking question

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Katsaros Kwn/nos <ntinos(at)aueb(dot)gr>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Linking question
Date: 2004-10-24 04:39:36
Message-ID: 20041024043936.GA56736@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 21, 2004 at 09:26:30AM +0300, Katsaros Kwn/nos wrote:
>
> I want to make use of some contrib/dblink functions inside my user
> defined functions, e.g. I would like to be able to call dblink_record()
> from my user defined code in this way:
>
> dblink_record("param1","param2");
>
> Is this possible?
>
> I would like to avoid:
>
> 1) inserting all the dblink code in my *.c file. This would not be a
> very clean way.
>
> 2) executing: "select dblink(...)"

Why do you want to avoid "select dblink(...)"? It would be easy
to handle such a query with the Server Programming Interface (SPI):

http://www.postgresql.org/docs/7.4/static/spi.html

If you don't use SPI then you're probably going to have to duplicate
some of the magic it performs. This seems needless, especially
since you admit that you're not good at C.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-10-24 04:51:20 Re: '1 year' = '360 days' ????
Previous Message Karim Nassar 2004-10-24 04:22:20 Re: Duplicating a database