{"id":273,"date":"2023-04-14T18:43:36","date_gmt":"2023-04-14T10:43:36","guid":{"rendered":"https:\/\/yhsbj.cn\/?p=273"},"modified":"2023-04-14T18:43:36","modified_gmt":"2023-04-14T10:43:36","slug":"flinkcdc%e5%90%8c%e6%ad%a5postgresql%e5%88%b0sqlserver","status":"publish","type":"post","link":"https:\/\/yhsbj.cn\/index.php\/2023\/04\/14\/273\/","title":{"rendered":"flinkcdc\u540c\u6b65PostgreSQL\u5230SQLServer"},"content":{"rendered":"\n<p>1.\u5fc5\u987b\u7528Linux\u7cfb\u7edf\uff0cWindows\u4e0b\u4f4e\u7248\u672cFlink\u6709Bug\uff0c\u9ad8\u7248\u672c\u7684API\u6539\u52a8\u592a\u5927\uff0c\u8d44\u6599\u592a\u5c11\u96be\u5f00\u53d1\u3002<\/p>\n\n\n\n<p>2.\u6211\u662f\u4f7f\u7528Docker\u7528Centos7\u955c\u50cf\uff0c\u7136\u540eFlink\u7248\u672c\u4e3a1.16.0\u3002<a href=\"https:\/\/archive.apache.org\/dist\/flink\/flink-1.16.1\/\" data-type=\"URL\" data-id=\"https:\/\/archive.apache.org\/dist\/flink\/flink-1.16.1\/\">https:\/\/archive.apache.org\/dist\/flink\/flink-1.16.1\/<\/a><\/p>\n\n\n\n<p>3.\u5b89\u88c5Java\uff0c\u53c2\u8003<a href=\"https:\/\/www.saoniuhuo.com\/article\/detail-92.html\" data-type=\"URL\" data-id=\"https:\/\/www.saoniuhuo.com\/article\/detail-92.html\">https:\/\/www.saoniuhuo.com\/article\/detail-92.html<\/a>\uff0c\u8fd9\u4e2a\u6559\u7a0b\u552f\u4e00\u4e0d\u597d\u7684\u5c31\u662f\u91cd\u542f\u540e\u73af\u5883\u53d8\u91cf\u5931\u6548\u3002<\/p>\n\n\n\n<p>4.SQLServer\u5f00\u542f\u5141\u8bb8\u8fdc\u7a0b\u8fde\u63a5\uff0c\u914d\u7f6e\u597d\u8bb0\u5f97\u91cd\u542f\u7535\u8111\uff0c\u91cd\u542f\u670d\u52a1\u4e0d\u884c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-22.png\" alt=\"\" class=\"wp-image-274\" width=\"317\" height=\"160\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-22.png 760w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-22-300x152.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/figure>\n\n\n\n<p>5.PostgreSQL\u6211\u4ece\u5b98\u7f51\u4e0b\u8f7d\u7684\u6700\u65b0\u7248\uff0c\u4e5f\u9700\u8981\u5f00\u542f\u5141\u8bb8\u8fdc\u7a0b\u8fde\u63a5\u3002<\/p>\n\n\n\n<p>6.\u5f00\u542f\u8fdc\u7a0b\u8fde\u63a5\u662f\u4e3a\u4e86\u8ba9Docker\u5bb9\u5668\u7684Centos\u53ef\u4ee5\u8bbf\u95ee\u5bbf\u4e3b\u7684\u6570\u636e\u5e93\u3002<\/p>\n\n\n\n<p>7.\u5206\u522b\u7ed9SQLServer\u548cPostgreSQL\u521b\u5efa\u8868\uff0c<span class=\"has-inline-color has-vivid-red-color\">SQLServer\u7684id\u4e0d\u9700\u8981\u8bbe\u7f6e\u4e3b\u952e<\/span>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-23.png\" alt=\"\" class=\"wp-image-275\" width=\"409\" height=\"99\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-23.png 809w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-23-300x73.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-23-768x186.png 768w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><figcaption>SQLServerbbibi&#8217;abiao\u8868<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-24.png\" alt=\"\" class=\"wp-image-276\" width=\"162\" height=\"121\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-24.png 313w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-24-300x224.png 300w\" sizes=\"(max-width: 162px) 100vw, 162px\" \/><figcaption>PostgreSQL\u8868\u8bbe\u8ba1\uff0c\u548cSQLServer\u662f\u4e00\u6837\u7684\u7c7b\u578b\uff0c\u4f46id\u6709\u4e3b\u952e\u548c\u81ea\u589e<\/figcaption><\/figure>\n\n\n\n<p>7.\u4fee\u6539PostgreSQL\u7684pg_hba.conf\u914d\u7f6e\u6587\u4ef6\uff0c\u591a\u52a0\u4e00\u6761\u4fe1\u606f\u8bbe\u7f6e\u5141\u8bb8\u8fdc\u7a0b\u8bbf\u95ee<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-26-1024x589.png\" alt=\"\" class=\"wp-image-278\" width=\"378\" height=\"217\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-26-1024x589.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-26-300x172.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-26-768x441.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-26-630x360.png 630w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-26.png 1110w\" sizes=\"(max-width: 378px) 100vw, 378px\" \/><\/figure>\n\n\n\n<p>8.\u4fee\u6539PostgreSQL\u7684postgresql.conf\u914d\u7f6e\u6587\u4ef6\uff0cFlinkCDC\u624d\u53ef\u4ee5\u76d1\u542c\u5230<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-27.png\" alt=\"\" class=\"wp-image-279\" width=\"383\" height=\"93\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-27.png 930w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-27-300x74.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-27-768x188.png 768w\" sizes=\"(max-width: 383px) 100vw, 383px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-28-1024x354.png\" alt=\"\" class=\"wp-image-280\" width=\"467\" height=\"161\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-28-1024x354.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-28-300x104.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-28-768x266.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-28.png 1150w\" sizes=\"(max-width: 467px) 100vw, 467px\" \/><\/figure>\n\n\n\n<p>9.IDEA\u521b\u5efaMaven\u9879\u76ee<\/p>\n\n\n\n<p>10.\u628a\u7528\u5230\u7684jar\u653e\u5230Flink\u7684lib\u76ee\u5f55\u4e0b\uff0c\u7136\u540eJava\u9879\u76ee\u6dfb\u52a0Jar\u7684\u5f15\u7528\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-25-1024x572.png\" alt=\"\" class=\"wp-image-277\" width=\"602\" height=\"336\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-25-1024x572.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-25-300x168.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-25-768x429.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-25.png 1513w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">11.\u5fc5\u987b\u8bf4\u660e\u4e00\u70b9\uff0cFlink\u9ad8\u548c\u4f4e\u7248\u672cAPI\u53d8\u5316\u5f88\u591a\uff0c\u5efa\u8baeJar\u7248\u672c\u548cFlink\u7248\u672c\u4fdd\u6301\u4e00\u81f4\uff01\uff01\uff01<\/span><\/strong><\/p>\n\n\n\n<p>12.\u521b\u5efaFlinkCdcDataStream.java\uff0c\u7f16\u5199Java\u4ee3\u7801\u76d1\u542cPostgreSQL\u8868\u7684\u53d8\u5316<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SourceFunction&lt;String> sourceFunction = PostgreSQLSource.&lt;String>builder()\n                    .hostname(\"192.168.0.148\").port(5432)\n                    .database(\"test_db_11\") \/\/ monitor postgres database\n                    .schemaList(\"public\")  \/\/ monitor inventory schema\n                    .tableList(\"public.test_table_11\") \/\/ monitor products table\n                    .decodingPluginName(\"pgoutput\")\n                    .slotName(\"t_table_slot\")\n                    .username(\"postgres\")\n                    .password(\"123\")\n                    .deserializer(new JsonDebeziumDeserializationSchema()) \/\/ converts SourceRecord to JSON String\n                    .build();\n\nStreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\nenv.enableCheckpointing(3000);\n\nenv.addSource(sourceFunction)\n   .addSink(new ClickHouseSink(\"test_table_mssql1\", \"id\"));\n\nenv.execute();<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-29-1024x724.png\" alt=\"\" class=\"wp-image-281\" width=\"553\" height=\"390\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-29-1024x724.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-29-300x212.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-29-768x543.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-29.png 1338w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/figure>\n\n\n\n<p>13.\u521b\u5efaClickHouseSink.java\uff0c\u7f16\u5199\u76d1\u542c\u5230\u6570\u636e\u53d8\u5316\u540e\u540c\u6b65\u5230SQLServer\uff0c\u4ee3\u7801\u592a\u591a\u5c31\u4e0d\u622a\u56fe\uff0c\u4ee3\u7801\u653e\u5230\u4e0b\u9762\u5427<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">package org.example;\n\nimport com.alibaba.fastjson2.JSON;\nimport com.alibaba.fastjson2.JSONObject;\nimport org.apache.flink.configuration.Configuration;\nimport org.apache.flink.streaming.api.functions.sink.RichSinkFunction;\n\nimport java.sql.Connection;\nimport java.sql.DriverManager;\nimport java.sql.PreparedStatement;\n\npublic class ClickHouseSink extends RichSinkFunction&lt;String> {\n    private Connection connection;\n    private String targetTableName;\n    private String idName;\n\n    public ClickHouseSink(String targetTableName, String idName) {\n        this.targetTableName = targetTableName;\n        this.idName = idName;\n    }\n\n    @Override\n    public void open(Configuration parameters) throws Exception {\n        super.open(parameters);\n\n        try {\n            if (this.connection == null) {\n                connection = getConnection();\n            }\n        } catch (Exception e) {\n            System.out.println(e.getMessage());\n        }\n    }\n\n    @Override\n    public void close() {\n        try {\n            \/\/\u5173\u95ed\u8fde\u63a5\u548c\u91ca\u653e\u8d44\u6e90\n            if (connection != null) {\n                connection.close();\n            }\n        } catch (Exception e) {\n            System.out.println(e.getMessage());\n        }\n    }\n\n    @Override\n    public void invoke(String sql, Context context) {\n        JSONObject res = JSON.parseObject(sql);\n        System.out.println(res);\n        try {\n            JSONObject after = res.getJSONObject(\"after\");\n            JSONObject before = res.getJSONObject(\"before\");\n\n            switch (res.getString(\"op\")) {\n                case \"r\":\n                    System.out.println(\"\u8bfb\u53d6\u6570\u636e\");\n                    break;\n                case \"d\":\n                    System.out.println(\"\u5220\u9664\u6570\u636e\");\n                    if (before != null) {\n                        PreparedStatement ps = this.connection.prepareStatement(\"delete from \" + targetTableName + \" where \" + idName + \"=?\");\n                        ps.setInt(1, before.getInteger(idName));\n                        ps.execute();\n                        ps.close();\n                    }\n                    break;\n                case \"u\":\n                    System.out.println(\"\u66f4\u65b0\u6570\u636e\");\n                    PreparedStatement ps = this.connection.prepareStatement(\"update \" + targetTableName + \" set name=?, age=? where id = ?\");\n                    ps.setString(1, after.getString(\"name\"));\n                    ps.setInt(2, after.getInteger(\"age\"));\n                    ps.setInt(3, after.getInteger(\"id\"));\n                    ps.execute();\n                    ps.close();\n                    break;\n            }\n\n            if (res.getString(\"op\").equals(\"c\")) {\n                System.out.println(\"\u63d2\u5165\u6570\u636e\");\n                if (after != null) {\n                    PreparedStatement ps = this.connection.prepareStatement(\"insert into \" + targetTableName + \"(id, name, age) values(?,?,?)\");\n                    ps.setInt(1, after.getInteger(\"id\"));\n                    ps.setString(2, after.getString(\"name\"));\n                    ps.setInt(3, after.getInteger(\"age\"));\n                    ps.execute();\n                    ps.close();\n                }\n            }\n        } catch (Exception ex) {\n            System.out.println(\"\u5f02\u5e38\" + ex.getMessage());\n        }\n    }\n\n    private static Connection getConnection() {\n        Connection con = null;\n        try {\n            Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\").newInstance();\n            con = DriverManager.getConnection(\"jdbc:sqlserver:\/\/192.168.0.148:1433;database=test_db_mssql;user=test;password=123;encrypt=true;trustServerCertificate=true;loginTimeout=30;\");\n        } catch (Exception e) {\n            System.out.println(\"-----------sqlserver get connection has exception , msg = \" + e.getMessage());\n        }\n        return con;\n    }\n}<\/pre>\n\n\n\n<p>15.IDEA\u6dfb\u52a0\u5de5\u4ef6\uff0c\u5e76\u4e14\u9009\u62e9\u5165\u53e3\u7c7b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-30-1024x634.png\" alt=\"\" class=\"wp-image-282\" width=\"702\" height=\"434\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-30-1024x634.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-30-300x186.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-30-768x476.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u6355\u83b7-30.png 1532w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/figure>\n\n\n\n<p>16.\u6784\u5efa\u5de5\u4ef6\u5f97\u5230\u4e00\u4e2aJar\u5305<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182814.png\" alt=\"\" class=\"wp-image-283\" width=\"245\" height=\"155\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182814.png 556w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182814-300x190.png 300w\" sizes=\"(max-width: 245px) 100vw, 245px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182853.png\" alt=\"\" class=\"wp-image-284\" width=\"331\" height=\"235\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182853.png 786w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182853-300x213.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-182853-768x546.png 768w\" sizes=\"(max-width: 331px) 100vw, 331px\" \/><\/figure>\n\n\n\n<p>17.\u542f\u52a8Docker\u7aef\u53e3\u6620\u5c048081\u7136\u540e\u542f\u52a8Flink1.16.0\uff0c\u8bb0\u5f97\u9700\u8981\u63d0\u524d\u628aJar\u653e\u8fdbFlink\u7684lib\u4e0b\u9762\uff0c\u5426\u5219Flink\u65e0\u6cd5\u52a0\u8f7dJar\u4f1a\u4e0a\u4f20\u5931\u8d25<\/p>\n\n\n\n<p>18.\u63d0\u4ea4\u521a\u521a\u751f\u6210\u7684Jar\u5305\uff0c\u5e76\u4e14\u8fd0\u884c<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183126-1024x411.png\" alt=\"\" class=\"wp-image-285\" width=\"459\" height=\"184\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183126-1024x411.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183126-300x120.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183126-768x308.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183126-1536x617.png 1536w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183126.png 1714w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183155-1024x477.png\" alt=\"\" class=\"wp-image-286\" width=\"479\" height=\"223\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183155-1024x477.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183155-300x140.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183155-768x358.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183155-1536x715.png 1536w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183155.png 1765w\" sizes=\"(max-width: 479px) 100vw, 479px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183321-1024x552.png\" alt=\"\" class=\"wp-image-287\" width=\"595\" height=\"320\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183321-1024x552.png 1024w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183321-300x162.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183321-768x414.png 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183321-1536x828.png 1536w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183321-2048x1104.png 2048w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><figcaption>\u8fd0\u884c\u6210\u529f<\/figcaption><\/figure>\n\n\n\n<p>\u81f3\u6b64\u5df2\u7ecf\u5b8c\u6210\u540c\u6b65\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765\u770b\u4e0b\u6548\u679c\uff1a<\/p>\n\n\n\n<p>1.PostgreSQL\u63d2\u5165\u6570\u636e\uff0cSQLServer\u5b9e\u65f6\u540c\u6b65<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183555-1.png\" alt=\"\" class=\"wp-image-289\" width=\"345\" height=\"233\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183808.png\" alt=\"\" class=\"wp-image-290\" width=\"269\" height=\"123\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183808.png 586w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/04\/\u5c4f\u5e55\u622a\u56fe-2023-04-14-183808-300x137.png 300w\" sizes=\"(max-width: 269px) 100vw, 269px\" \/><\/figure>\n\n\n\n<p>PostgreSQL\u9ed8\u8ba4\u60c5\u51b5\u65e0\u6cd5\u4fee\u6539\u8868\uff0c\u6211\u5c31\u4e0d\u91cd\u65b0\u5efa\u4e00\u4e2a\u8868\u4e86\u3002<\/p>\n\n\n\n<p>MySQL\u6d4b\u8bd5\u8fc7\u589e\u5220\u6539\u90fd\u662f\u5b9e\u65f6\u540c\u6b65\uff0c\u4ee3\u7801\u662f\u540c\u4e00\u4efd\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5fc5\u987b\u7528Linux\u7cfb\u7edf\uff0cWindows\u4e0b\u4f4e\u7248\u672cFlink\u6709Bug\uff0c\u9ad8\u7248\u672c\u7684API\u6539\u52a8\u592a\u5927\uff0c\u8d44\u6599\u592a\u5c11\u96be\u5f00\u53d1\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/273"}],"collection":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":2,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/273\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}