![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello everyone, We have to copy some data from one table to another table in other database. Is there any way to do this from inside a custom plpgsql function, with no external applications, interfaces or storage? Any help is appreciated. |
#3
| |||
| |||
|
|
Hello everyone, We have to copy some data from one table to another table in other database. Is there any way to do this from inside a custom plpgsql function, with no external applications, interfaces or storage? |
#4
| |||
| |||
|
|
On Thu, Feb 12, 2004 at 11:43:11 -0200, "Marcus Andree S. Magalhaes" <marcus.magalhaes (AT) vlinfo (DOT) com.br> wrote: Hello everyone, We have to copy some data from one table to another table in other database. Is there any way to do this from inside a custom plpgsql function, with no external applications, interfaces or storage? You can do something like: INSERT INTO tablea (col1, col2, col3) SELECT col1, col2, col3 FROM tableb; |
#5
| |||
| |||
|
|
This would work if both tables (tablea and tableb) resides on the same database. What to do if, say tablea lives on database 'db1' and tableb resides on another database, 'db2' ? |
#6
| |||
| |||
|
|
Then the dblink contrib package might be of help. I haven't used it, so I don't know for sure that it will solve your problem. |
#7
| |||
| |||
|
|
Thanks. It seems to be exactly what I need! Then the dblink contrib package might be of help. I haven't used it, so I don't know for sure that it will solve your problem. ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org) |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
Is it possible to use portals as a kind of concurrent cursors over a single TCP/IP connection? Or should you execute and close portals one after another and never execute the next portal before the previous one is closed? (Like regular transactions.) |
#10
| |||
| |||
|
|
I'm reading the docs about the extended query language and the portals. Is it possible to use portals as a kind of concurrent cursors over a single TCP/IP connection? Or should you execute and close portals one after another and never execute the next portal before the previous one is closed? (Like regular transactions.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |