免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4427 | 回复: 1
打印 上一主题 下一主题

dblink死活装不上,各位大虾进来看看 [复制链接]

论坛徽章:
71
15-16赛季CBA联赛之同曦
日期:2018-08-23 15:41:42辰龙
日期:2014-08-15 09:07:43狮子座
日期:2014-06-03 13:55:33亥猪
日期:2014-06-02 11:17:08巨蟹座
日期:2014-05-06 10:02:03午马
日期:2014-05-04 08:18:27亥猪
日期:2014-04-29 11:11:32技术图书徽章
日期:2014-04-24 15:51:26技术图书徽章
日期:2014-04-17 11:01:53辰龙
日期:2014-04-15 12:45:46亥猪
日期:2014-04-11 09:06:23射手座
日期:2014-04-01 15:28:10
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-11-30 12:24 |只看该作者 |倒序浏览

  1. [postgres@VM sql]$ psql -f ./dblink.sql pgpool
  2. CREATE EXTENSION
  3. CREATE TABLE
  4. INSERT 0 1
  5. INSERT 0 1
  6. INSERT 0 1
  7. INSERT 0 1
  8. INSERT 0 1
  9. INSERT 0 1
  10. INSERT 0 1
  11. INSERT 0 1
  12. INSERT 0 1
  13. INSERT 0 1
  14. position | colname
  15. ----------+---------
  16.         1 | f1
  17.         2 | f2
  18. (2 rows)

  19.                   dblink_build_sql_insert                  
  20. -----------------------------------------------------------
  21. INSERT INTO foo(f1,f2,f3) VALUES('99','xyz','{a0,b0,c0}')
  22. (1 row)

  23. psql:./dblink.sql:25: ERROR:  invalid attribute number 4
  24.                                 dblink_build_sql_update                                 
  25. ----------------------------------------------------------------------------------------
  26. UPDATE foo SET f1 = '99', f2 = 'xyz', f3 = '{a0,b0,c0}' WHERE f1 = '99' AND f2 = 'xyz'
  27. (1 row)

  28. psql:./dblink.sql:31: ERROR:  invalid attribute number 4
  29.            dblink_build_sql_delete           
  30. ---------------------------------------------
  31. DELETE FROM foo WHERE f1 = '0' AND f2 = 'a'
  32. (1 row)

  33. psql:./dblink.sql:36: ERROR:  invalid attribute number 4
  34. CREATE SCHEMA
  35. CREATE TABLE
  36. INSERT 0 1
  37. position | colname
  38. ----------+---------
  39.         1 | f1
  40.         2 | f2
  41. (2 rows)

  42.                         dblink_build_sql_insert                        
  43. ------------------------------------------------------------------------
  44. INSERT INTO "MySchema"."Foo"(f1,f2,f3) VALUES('99','xyz','{a0,b0,c0}')
  45. (1 row)

  46.                                        dblink_build_sql_update                                       
  47. -----------------------------------------------------------------------------------------------------
  48. UPDATE "MySchema"."Foo" SET f1 = '99', f2 = 'xyz', f3 = '{a0,b0,c0}' WHERE f1 = '99' AND f2 = 'xyz'
  49. (1 row)

  50.                  dblink_build_sql_delete                  
  51. ----------------------------------------------------------
  52. DELETE FROM "MySchema"."Foo" WHERE f1 = '0' AND f2 = 'a'
  53. (1 row)

  54. psql:./dblink.sql:61: ERROR:  could not establish connection
  55. DETAIL:  FATAL:  database "contrib_regression" does not exist

  56. psql:./dblink.sql:66: ERROR:  connection not available
  57. psql:./dblink.sql:69: ERROR:  could not establish connection
  58. DETAIL:  FATAL:  database "contrib_regression" does not exist

  59. psql:./dblink.sql:74: ERROR:  connection not available
  60. psql:./dblink.sql:77: ERROR:  connection not available
  61. psql:./dblink.sql:80: ERROR:  connection not available
  62. psql:./dblink.sql:83: ERROR:  connection not available
  63. psql:./dblink.sql:86: ERROR:  connection not available
  64. psql:./dblink.sql:89: ERROR:  connection not available
  65. psql:./dblink.sql:93: ERROR:  connection not available
  66. psql:./dblink.sql:96: ERROR:  connection not available
  67. psql:./dblink.sql:100: ERROR:  connection not available
  68. psql:./dblink.sql:104: ERROR:  connection not available
  69. psql:./dblink.sql:107: ERROR:  connection not available
  70. psql:./dblink.sql:110: ERROR:  connection not available
  71. psql:./dblink.sql:114: ERROR:  connection not available
  72. psql:./dblink.sql:118: ERROR:  connection not available
  73. psql:./dblink.sql:121: ERROR:  connection not available
  74. psql:./dblink.sql:126: ERROR:  connection not available
  75. psql:./dblink.sql:130: ERROR:  could not establish connection
  76. DETAIL:  FATAL:  database "contrib_regression" does not exist

  77. psql:./dblink.sql:133: ERROR:  could not establish connection
  78. DETAIL:  FATAL:  database "contrib_regression" does not exist

  79. psql:./dblink.sql:137: ERROR:  connection not available
  80. psql:./dblink.sql:141: ERROR:  connection not available
  81. psql:./dblink.sql:145: ERROR:  connection not available
  82. psql:./dblink.sql:148: ERROR:  connection not available
  83. psql:./dblink.sql:153: ERROR:  connection not available
  84. psql:./dblink.sql:156: ERROR:  connection not available
  85. psql:./dblink.sql:159: ERROR:  connection not available
  86. psql:./dblink.sql:164: ERROR:  connection not available
  87. psql:./dblink.sql:167: ERROR:  connection not available
  88. psql:./dblink.sql:176: ERROR:  could not establish connection
  89. DETAIL:  missing "=" after "myconn" in connection info string

  90. psql:./dblink.sql:179: ERROR:  could not establish connection
  91. DETAIL:  FATAL:  database "contrib_regression" does not exist

  92. psql:./dblink.sql:184: ERROR:  could not establish connection
  93. DETAIL:  missing "=" after "myconn" in connection info string

  94. psql:./dblink.sql:189: ERROR:  could not establish connection
  95. DETAIL:  missing "=" after "myconn" in connection info string

  96. psql:./dblink.sql:193: ERROR:  could not establish connection
  97. DETAIL:  FATAL:  database "contrib_regression" does not exist

  98. psql:./dblink.sql:196: ERROR:  could not establish connection
  99. DETAIL:  FATAL:  database "contrib_regression" does not exist

  100. psql:./dblink.sql:201: ERROR:  could not establish connection
  101. DETAIL:  missing "=" after "myconn2" in connection info string

  102. psql:./dblink.sql:204: ERROR:  connection "myconn2" not available
  103. psql:./dblink.sql:207: ERROR:  connection "myconn" not available
  104. psql:./dblink.sql:210: ERROR:  could not establish connection
  105. DETAIL:  missing "=" after "myconn" in connection info string

  106. psql:./dblink.sql:213: ERROR:  could not establish connection
  107. DETAIL:  missing "=" after "myconn" in connection info string

  108. psql:./dblink.sql:216: ERROR:  connection "myconn" not available
  109. psql:./dblink.sql:219: ERROR:  connection "myconn" not available
  110. psql:./dblink.sql:222: ERROR:  could not establish connection
  111. DETAIL:  missing "=" after "myconn" in connection info string

  112. psql:./dblink.sql:225: ERROR:  could not establish connection
  113. DETAIL:  missing "=" after "myconn" in connection info string

  114. psql:./dblink.sql:228: ERROR:  connection "myconn" not available
  115. psql:./dblink.sql:231: ERROR:  connection "myconn" not available
  116. psql:./dblink.sql:234: ERROR:  connection "myconn" not available
  117. psql:./dblink.sql:237: ERROR:  could not establish connection
  118. DETAIL:  missing "=" after "myconn" in connection info string

  119. psql:./dblink.sql:240: ERROR:  connection "myconn" not available
  120. psql:./dblink.sql:243: ERROR:  could not establish connection
  121. DETAIL:  missing "=" after "myconn" in connection info string

  122. psql:./dblink.sql:246: ERROR:  could not establish connection
  123. DETAIL:  missing "=" after "myconn" in connection info string

  124. psql:./dblink.sql:249: ERROR:  connection "myconn" not available
  125. psql:./dblink.sql:253: ERROR:  connection "myconn" not available
  126. psql:./dblink.sql:256: ERROR:  connection "myconn" not available
  127. psql:./dblink.sql:260: ERROR:  connection "myconn" not available
  128. psql:./dblink.sql:264: ERROR:  connection "myconn" not available
  129. psql:./dblink.sql:267: ERROR:  could not establish connection
  130. DETAIL:  missing "=" after "myconn" in connection info string

  131. psql:./dblink.sql:271: ERROR:  connection "myconn" not available
  132. psql:./dblink.sql:274: ERROR:  connection "myconn" not available
  133. psql:./dblink.sql:279: ERROR:  could not establish connection
  134. DETAIL:  missing "=" after "myconn" in connection info string

  135. psql:./dblink.sql:282: ERROR:  could not establish connection
  136. DETAIL:  FATAL:  database "contrib_regression" does not exist

  137. psql:./dblink.sql:286: ERROR:  could not establish connection
  138. DETAIL:  missing "=" after "myconn" in connection info string

  139. psql:./dblink.sql:290: ERROR:  could not establish connection
  140. DETAIL:  missing "=" after "myconn" in connection info string

  141. psql:./dblink.sql:293: ERROR:  could not establish connection
  142. DETAIL:  missing "=" after "myconn" in connection info string

  143. psql:./dblink.sql:298: ERROR:  could not establish connection
  144. DETAIL:  missing "=" after "myconn" in connection info string

  145. psql:./dblink.sql:301: ERROR:  could not establish connection
  146. DETAIL:  missing "=" after "myconn" in connection info string

  147. psql:./dblink.sql:306: ERROR:  could not establish connection
  148. DETAIL:  missing "=" after "myconn" in connection info string

  149. psql:./dblink.sql:309: ERROR:  connection "myconn" not available
  150. psql:./dblink.sql:313: ERROR:  connection "myconn" not available
  151. psql:./dblink.sql:316: ERROR:  could not establish connection
  152. DETAIL:  FATAL:  database "contrib_regression" does not exist

  153. psql:./dblink.sql:318: ERROR:  connection "dtest1" not available
  154. psql:./dblink.sql:320: ERROR:  could not establish connection
  155. DETAIL:  FATAL:  database "contrib_regression" does not exist

  156. psql:./dblink.sql:322: ERROR:  connection "dtest2" not available
  157. psql:./dblink.sql:324: ERROR:  could not establish connection
  158. DETAIL:  FATAL:  database "contrib_regression" does not exist

  159. psql:./dblink.sql:326: ERROR:  connection "dtest3" not available
  160. psql:./dblink.sql:334: ERROR:  connection "dtest1" not available
  161. CREATE FUNCTION
  162. unnest
  163. --------
  164. (0 rows)

  165. psql:./dblink.sql:345: ERROR:  connection "dtest1" not available
  166. psql:./dblink.sql:347: ERROR:  connection "dtest1" not available
  167. psql:./dblink.sql:348: ERROR:  connection "dtest2" not available
  168. psql:./dblink.sql:349: ERROR:  connection "dtest3" not available
  169. psql:./dblink.sql:351: ERROR:  relation "result" does not exist
  170. LINE 1: SELECT * from result;
  171.                       ^
  172. psql:./dblink.sql:353: ERROR:  could not establish connection
  173. DETAIL:  FATAL:  database "contrib_regression" does not exist

  174. psql:./dblink.sql:355: ERROR:  connection "dtest1" not available
  175. psql:./dblink.sql:357: ERROR:  connection "dtest1" not available
  176. psql:./dblink.sql:358: ERROR:  connection "dtest1" not available
  177. psql:./dblink.sql:359: ERROR:  connection "dtest1" not available
  178. CREATE ROLE
  179. CREATE SERVER
  180. psql:./dblink.sql:366: ERROR:  invalid option "server"
  181. HINT:  Valid options in this context are: user, password
  182. CREATE USER MAPPING
  183. GRANT
  184. GRANT
  185. You are now connected to database "pgpool" as user "dblink_regression_test".
  186. psql:./dblink.sql:375: ERROR:  password is required
  187. DETAIL:  Non-superusers must provide a password in the connection string.
  188. psql:./dblink.sql:377: ERROR:  could not establish connection
  189. DETAIL:  FATAL:  database "contrib_regression" does not exist

  190. psql:./dblink.sql:378: ERROR:  password is required
  191. DETAIL:  Non-superusers must provide a password in the connection string.
  192. You are now connected to database "pgpool" as user "postgres".
  193. REVOKE
  194. REVOKE
  195. DROP ROLE
  196. DROP USER MAPPING
  197. DROP SERVER
  198. psql:./dblink.sql:388: ERROR:  could not establish connection
  199. DETAIL:  FATAL:  database "contrib_regression" does not exist

  200. psql:./dblink.sql:391: ERROR:  connection not available
  201. psql:./dblink.sql:393: ERROR:  connection not available
  202. psql:./dblink.sql:395: ERROR:  connection not available
  203. psql:./dblink.sql:396: ERROR:  connection not available
  204. notify_name | is_self_notify | extra
  205. -------------+----------------+-------
  206. (0 rows)

  207. notify_name | be_pid | extra
  208. -------------+--------+-------
  209. (0 rows)

  210. psql:./dblink.sql:402: ERROR:  connection not available
  211. CREATE TABLE
  212. INSERT 0 1
  213. ALTER TABLE
  214.                           dblink_build_sql_insert                          
  215. ---------------------------------------------------------------------------
  216. INSERT INTO test_dropped(id,col2b,col3,col4) VALUES('2','113','foo','42')
  217. (1 row)

  218.                                   dblink_build_sql_update                                 
  219. -------------------------------------------------------------------------------------------
  220. UPDATE test_dropped SET id = '2', col2b = '113', col3 = 'foo', col4 = '42' WHERE id = '2'
  221. (1 row)

  222.          dblink_build_sql_delete         
  223. -----------------------------------------
  224. DELETE FROM test_dropped WHERE id = '2'
  225. (1 row)

  226. SET
  227. SET
  228. SET
  229. psql:./dblink.sql:434: ERROR:  could not establish connection
  230. DETAIL:  FATAL:  database "contrib_regression" does not exist

  231. psql:./dblink.sql:435: ERROR:  could not establish connection
  232. DETAIL:  missing "=" after "myconn" in connection info string

  233. psql:./dblink.sql:441: ERROR:  could not establish connection
  234. DETAIL:  missing "=" after "myconn" in connection info string

  235. psql:./dblink.sql:449: ERROR:  could not establish connection
  236. DETAIL:  missing "=" after "myconn" in connection info string

  237. psql:./dblink.sql:455: ERROR:  connection "myconn" not available
  238. psql:./dblink.sql:459: ERROR:  connection "myconn" not available
  239. psql:./dblink.sql:460: ERROR:  relation "result" does not exist
  240. LINE 1: SELECT * FROM result;
  241.                       ^
  242. psql:./dblink.sql:461: ERROR:  table "result" does not exist
  243. psql:./dblink.sql:468: ERROR:  connection "myconn" not available
  244. psql:./dblink.sql:474: ERROR:  connection "myconn" not available
  245. psql:./dblink.sql:475: ERROR:  relation "result" does not exist
  246. LINE 1: SELECT * FROM result;
  247.                       ^
  248. psql:./dblink.sql:476: ERROR:  table "result" does not exist
  249. psql:./dblink.sql:479: ERROR:  could not establish connection
  250. DETAIL:  missing "=" after "myconn" in connection info string

  251. psql:./dblink.sql:483: ERROR:  could not establish connection
  252. DETAIL:  missing "=" after "myconn" in connection info string

  253. CREATE TABLE
  254. psql:./dblink.sql:489: ERROR:  could not establish connection
  255. DETAIL:  missing "=" after "myconn" in connection info string

  256. psql:./dblink.sql:494: ERROR:  could not establish connection
  257. DETAIL:  missing "=" after "myconn" in connection info string

  258. psql:./dblink.sql:496: ERROR:  could not establish connection
  259. DETAIL:  missing "=" after "myconn" in connection info string

  260. psql:./dblink.sql:501: ERROR:  could not establish connection
  261. DETAIL:  missing "=" after "myconn" in connection info string

  262. t
  263. ---
  264. (0 rows)

  265. DROP TABLE
  266. psql:./dblink.sql:509: ERROR:  connection "myconn" not available
  267. psql:./dblink.sql:511: ERROR:  connection "myconn" not available
  268. psql:./dblink.sql:513: ERROR:  connection "myconn" not available
  269. DateStyle
  270. -----------
  271. ISO, MDY
  272. (1 row)

  273. IntervalStyle
  274. ---------------
  275. postgres
  276. (1 row)

  277. psql:./dblink.sql:521: ERROR:  connection "myconn" not available
  278. RESET
  279. RESET
  280. RESET
复制代码

论坛徽章:
71
15-16赛季CBA联赛之同曦
日期:2018-08-23 15:41:42辰龙
日期:2014-08-15 09:07:43狮子座
日期:2014-06-03 13:55:33亥猪
日期:2014-06-02 11:17:08巨蟹座
日期:2014-05-06 10:02:03午马
日期:2014-05-04 08:18:27亥猪
日期:2014-04-29 11:11:32技术图书徽章
日期:2014-04-24 15:51:26技术图书徽章
日期:2014-04-17 11:01:53辰龙
日期:2014-04-15 12:45:46亥猪
日期:2014-04-11 09:06:23射手座
日期:2014-04-01 15:28:10
2 [报告]
发表于 2014-11-30 12:32 |只看该作者
本帖最后由 zhaopingzi 于 2014-11-30 12:56 编辑

版本是psql9.3.0
可以

  1. select dblink_connect('test_dblink','dbname=mytest host=127.0.0.1 port=5455 user=postgres');            
  2. dblink_connect
  3. ----------------
  4. OK
  5. (1 row)
复制代码
难道已经装好了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP