| From: | Joshua Tolley <eggyknap(at)gmail(dot)com> |
|---|---|
| To: | Carel Combrink <s25291930(at)tuks(dot)co(dot)za> |
| Cc: | PostgreSQL Novice List <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: Libpq in C Language Function |
| Date: | 2010-08-06 13:53:54 |
| Message-ID: | 4c5c13fc.20d7720a.40ea.666e@mx.google.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Fri, Aug 06, 2010 at 03:36:40PM +0200, Carel Combrink wrote:
> Hi,
>
> Is it possible to connect to another database from within a database.
> The 2 databases will probably not be on the same computer.
>
> Is it possible to create a C LANGUAGE function that connects to another
> database using libpq? I have tried this but after calling PQconnectedb
> the status returned by PQstatus is CONNECTION_BAD.
It sounds like you want dblink.
http://www.postgresql.org/docs/current/static/dblink.html
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joshua Tolley | 2010-08-06 13:57:22 | Re: Best way to test/develop lots of nested functions? |
| Previous Message | Carel Combrink | 2010-08-06 13:36:40 | Libpq in C Language Function |