Re: Insert into other database

From: "James Harper" <james(dot)harper(at)bendigoit(dot)com(dot)au>
To: "Rodolfo Campos" <camposer(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Insert into other database
Date: 2006-02-08 22:26:01
Message-ID: AEC6C66638C05B468B556EA548C1A77DAF07BC@trantor
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi Fellows,
>
> I'm wondering if in postgres we can insert a tuple into a table that
is
> outside of a database (I'm supossed to be connected to database1 and
want
> to insert a register into a table in database2).
>
> This question is because I want to update a tables into one database
from
> a trigger (written in C), and the table who fires the trigger is in
> another database.
>
> I'm making the connection with SPI_connect. What can I do?? Is this
> posible??
>

I'd like to be able to do this too, but when I asked the question it was
suggested that if you want to do this then you should use different
schema's within the same database, instead of different databases. Maybe
it's in the FAQ too?

Given that your trigger is written in C, couldn't you use libpq to
connect to and update the other database?

James

Browse pgsql-general by date

  From Date Subject
Next Message James Harper 2006-02-08 22:37:35 owner as namespace?
Previous Message Michael Fuhr 2006-02-08 22:20:57 Re: Insert into other database