Search Postgresql Archives

Re: dblink & 4 master operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
> 


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux