From: | Bear <beatabogdanowicz(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | problem with nested dblink function |
Date: | 2012-02-07 14:00:50 |
Message-ID: | 3c79a8f0-47eb-451c-94ab-590d9628751a@p21g2000yqm.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello everyone !
I have a problem with dblink function.
I need to insert data using pl / pgsql function from one server to
another.
The data from server FS4 to server FS3.
This code does not work:
"select dblink ('dbname = ant_trendy port = 5433 host = FS3 user =
postgres password = postgres ', 'insert into rap.5_7_fil (select *
from temp.fil_packet_template)')"
-->temp.fil_packet_template<-- is table from server FS4
Code with nested function dblink works with the Query window but when
it invokes the function inside the pl / pgsql I get the message all
right but the data are not inserted.
Code work with Query window / doesn't work with pl/pgsql function:
"select dblink
(' dbname=ant_trendy port=5433 host=FS3 user=postgres
password=postgres ',
' insert into rap.5_7_fil (select * from dblink ('' dbname=ant_trendy
port=5432 host=FS4 user=postgres password=postgres '', '' select *
from temp.fil_packet_template '')
as (
"time" timestamp without time zone,
tzewn double precision,
tzas_msc double precision,
tpow_msc double precision,
vflow double precision,
pwr double precision,
tpwymco double precision,
tpwymco_obl double precision,
tzas double precision,
tzas_obl double precision,
tpow double precision,
tcwu double precision,
tcwu_obl double precision,
tcwu_cyrk double precision,
pstat double precision,
pwr_proc double precision,
tpow_diff double precision,
x_rez_1 double precision,
x_rez_2 double precision,
x_rez_3 double precision,
x_rez_4 double precision
))
')"
Does call the nested function dblink from pl / pgsql functions has
there any restrictions?
How can I in a different way to pass data between servers?
Thanks in advance.
From | Date | Subject | |
---|---|---|---|
Next Message | ssylla | 2012-02-08 07:39:44 | update multiple columns with multiple values |
Previous Message | Adrian Klaver | 2012-02-07 03:28:55 | Re: type cast about int to bit |