Re: dblink & 4 master operation - Mailing list pgsql-general

From Mohsen Pahlevanzadeh
Subject Re: dblink & 4 master operation
Date
Msg-id 1252761776.21393.7.camel@debian
Whole thread Raw
In response to dblink & 4 master operation  (Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>)
List 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
>
>


pgsql-general by date:

Previous
From: Mohsen Pahlevanzadeh
Date:
Subject: dblink & 4 master operation
Next
From: Merlin Moncure
Date:
Subject: Re: Getting Out Parameter in the application using libpq