Re: dblink & 4 master operation

From: Mohsen Pahlevanzadeh <mohsen(at)pahlevanzadeh(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: dblink & 4 master operation
Date: 2009-09-12 13:22:56
Message-ID: 1252761776.21393.7.camel@debian
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,
I use following command :
su -
su postgres
cd ~
psql urldump
urldump=# \i /usr/share/postgresql/8.4/contrib/dblink.sql
.....
urldump=# select dblink_connect('my','dbname=urldump');
dblink_connect
----------------
OK
(1 row)
urldump=# select dblink('my','INSERT INTO ipmap (ip,username) VALUES
("127.0.0.1","mohsen");');
ERROR: column "127.0.0.1" does not exist
CONTEXT: Error occurred on dblink connection named "unnamed": could not
execute query.
urldump=#

/////////////////////////////////////////////////////////////////////

I need to insert into ipmap table with ip & username columns.Please help
me...........

On Sat, 2009-09-12 at 16:10 +0430, Mohsen Pahlevanzadeh wrote:
> Dear all,
>
> My boss requested me that i use dblink even for a sample INSERT, now i
> have a INSERT query, But i don't know how to invoke insert query without
> select query.
> I have search for doc in this topic, But i just saw API ref in
> postgresql.org.
> Can u help me?
>
> Yours,
> Mohsen
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Clodoaldo Neto 2009-09-12 15:22:18 Missing 8.2.14 source rpms
Previous Message Merlin Moncure 2009-09-12 13:21:09 Re: Getting Out Parameter in the application using libpq