{"id":44378,"date":"2025-06-18T17:17:40","date_gmt":"2025-06-18T09:17:40","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/44378.html"},"modified":"2025-06-18T17:17:40","modified_gmt":"2025-06-18T09:17:40","slug":"postgresql%e7%9a%84%e6%89%a9%e5%b1%95lo","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/44378.html","title":{"rendered":"PostgreSQL\u7684\u6269\u5c55lo"},"content":{"rendered":"<h2>PostgreSQL\u7684\u6269\u5c55lo<\/h2>\n<h3>\u4e00\u3001lo \u6269\u5c55\u6982\u8ff0<\/h3>\n<p>lo (Large Object) \u662f PostgreSQL \u7528\u4e8e\u5b58\u50a8\u5927\u5bf9\u8c61(\u901a\u5e38\u8d85\u8fc7 1GB)\u7684\u6269\u5c55\u6a21\u5757&#xff0c;\u63d0\u4f9b\u5bf9\u4e8c\u8fdb\u5236\u5927\u5bf9\u8c61(BLOB)\u7684\u9ad8\u6548\u5b58\u50a8\u548c\u7ba1\u7406\u529f\u80fd\u3002<\/p>\n<h3>\u4e8c\u3001\u6838\u5fc3\u7279\u6027<\/h3>\n<table>\n<tr>\u7279\u6027\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u5b58\u50a8\u5927\u5c0f<\/td>\n<td>\u7406\u8bba\u6700\u5927 4TB (\u5b9e\u9645\u53d7\u6587\u4ef6\u7cfb\u7edf\u9650\u5236)<\/td>\n<\/tr>\n<tr>\n<td>\u5b58\u50a8\u65b9\u5f0f<\/td>\n<td>\u72ec\u7acb\u4e8e\u8868\u6570\u636e\u5b58\u50a8&#xff0c;\u901a\u8fc7 OID \u5f15\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u4e8b\u52a1\u652f\u6301<\/td>\n<td>\u5b8c\u5168 ACID \u517c\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>\u8bbf\u95ee\u63a7\u5236<\/td>\n<td>\u72ec\u7acb\u7684\u6743\u9650\u7cfb\u7edf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e09\u3001\u542f\u7528\u65b9\u6cd5<\/h3>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u6269\u5c55<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> EXTENSION lo<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u9a8c\u8bc1\u5b89\u88c5<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> pg_available_extensions <span class=\"token keyword\">WHERE<\/span> name <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;lo&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h3>\u56db\u3001\u4e3b\u8981\u51fd\u6570<\/h3>\n<h4>1. \u57fa\u7840\u64cd\u4f5c\u51fd\u6570<\/h4>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u7a7a\u5927\u5bf9\u8c61<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_create<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5bfc\u5165\u6587\u4ef6<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_import<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;\/path\/to\/file&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5bfc\u51fa\u5230\u6587\u4ef6<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_export<span class=\"token punctuation\">(<\/span>oid<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\/path\/to\/newfile&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5220\u9664\u5bf9\u8c61<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_unlink<span class=\"token punctuation\">(<\/span>oid<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>2. \u9ad8\u7ea7\u64cd\u4f5c\u51fd\u6570<\/h4>\n<p><span class=\"token comment\">&#8212; \u6253\u5f00\u5bf9\u8c61(\u8fd4\u56defd)<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_open<span class=\"token punctuation\">(<\/span>oid<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">mode<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">&#8212; mode: INV_READ(0x20000), INV_WRITE(0x40000)<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u8bfb\u5199\u64cd\u4f5c<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> loread<span class=\"token punctuation\">(<\/span>fd<span class=\"token punctuation\">,<\/span> len<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lowrite<span class=\"token punctuation\">(<\/span>fd<span class=\"token punctuation\">,<\/span> buf<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5b9a\u4f4d<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_lseek<span class=\"token punctuation\">(<\/span>fd<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">offset<\/span><span class=\"token punctuation\">,<\/span> whence<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">&#8212; whence: 0&#061;\u5934,1&#061;\u5f53\u524d,2&#061;\u5c3e<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5173\u95ed\u5bf9\u8c61<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_close<span class=\"token punctuation\">(<\/span>fd<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h3>\u4e94\u3001\u5b9e\u9645\u5e94\u7528\u793a\u4f8b<\/h3>\n<h4>1. \u5b58\u50a8\u56fe\u7247<\/h4>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u8868\u5b58\u50a8\u56fe\u7247\u5f15\u7528<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> images <span class=\"token punctuation\">(<\/span><br \/>\n    id <span class=\"token keyword\">SERIAL<\/span> <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    name <span class=\"token keyword\">TEXT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    image_oid OID<br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5bfc\u5165\u56fe\u7247<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> images <span class=\"token punctuation\">(<\/span>name<span class=\"token punctuation\">,<\/span> image_oid<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">VALUES<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;logo&#039;<\/span><span class=\"token punctuation\">,<\/span> lo_import<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;\/var\/www\/images\/logo.png&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5bfc\u51fa\u56fe\u7247<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_export<span class=\"token punctuation\">(<\/span>image_oid<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\/tmp\/exported_logo.png&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">FROM<\/span> images <span class=\"token keyword\">WHERE<\/span> id <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>2. \u7a0b\u5e8f\u5316\u5904\u7406 (PL\/pgSQL)<\/h4>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token operator\">OR<\/span> <span class=\"token keyword\">REPLACE<\/span> <span class=\"token keyword\">FUNCTION<\/span> process_large_object<span class=\"token punctuation\">(<\/span>obj_oid OID<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">RETURNS<\/span> void <span class=\"token keyword\">AS<\/span> $$<br \/>\n<span class=\"token keyword\">DECLARE<\/span><br \/>\n    fd <span class=\"token keyword\">INTEGER<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    buf BYTEA<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">BEGIN<\/span><br \/>\n    fd :<span class=\"token operator\">&#061;<\/span> lo_open<span class=\"token punctuation\">(<\/span>obj_oid<span class=\"token punctuation\">,<\/span> CAST<span class=\"token punctuation\">(<\/span>x<span class=\"token string\">&#039;20000&#039;<\/span> <span class=\"token keyword\">AS<\/span> <span class=\"token keyword\">INTEGER<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">&#8212; \u53ea\u8bfb\u6a21\u5f0f\u6253\u5f00<\/span><br \/>\n    <span class=\"token comment\">&#8212; \u8bfb\u53d6\u524d1KB\u6570\u636e<\/span><br \/>\n    buf :<span class=\"token operator\">&#061;<\/span> loread<span class=\"token punctuation\">(<\/span>fd<span class=\"token punctuation\">,<\/span> <span class=\"token number\">1024<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">&#8212; \u5904\u7406\u903b\u8f91&#8230;<\/span><br \/>\n    PERFORM lo_close<span class=\"token punctuation\">(<\/span>fd<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">END<\/span><span class=\"token punctuation\">;<\/span><br \/>\n$$ <span class=\"token keyword\">LANGUAGE<\/span> plpgsql<span class=\"token punctuation\">;<\/span><\/p>\n<h3>\u516d\u3001\u7ba1\u7406\u7ef4\u62a4<\/h3>\n<h4>1. \u67e5\u770b\u5927\u5bf9\u8c61<\/h4>\n<p><span class=\"token comment\">&#8212; \u67e5\u770b\u6240\u6709\u5927\u5bf9\u8c61<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> oid<span class=\"token punctuation\">,<\/span> pg_size_pretty<span class=\"token punctuation\">(<\/span>lo_lseek<span class=\"token punctuation\">(<\/span>oid<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> size<br \/>\n<span class=\"token keyword\">FROM<\/span> pg_largeobject_metadata<span class=\"token punctuation\">;<\/span><\/p>\n<h4>2. \u6e05\u7406\u5b64\u7acb\u5bf9\u8c61<\/h4>\n<p><span class=\"token comment\">&#8212; \u67e5\u627e\u53ef\u80fd\u5b64\u7acb\u7684\u5bf9\u8c61<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> oid <span class=\"token keyword\">FROM<\/span> pg_largeobject_metadata<br \/>\n<span class=\"token keyword\">WHERE<\/span> oid <span class=\"token operator\">NOT<\/span> <span class=\"token operator\">IN<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">SELECT<\/span> image_oid <span class=\"token keyword\">FROM<\/span> images <span class=\"token keyword\">WHERE<\/span> image_oid <span class=\"token operator\">IS<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5b89\u5168\u5220\u9664(\u5148\u5907\u4efd!)<\/span><br \/>\n<span class=\"token comment\">&#8212; SELECT lo_unlink(oid) FROM (&#8230;\u4e0a\u8ff0\u67e5\u8be2&#8230;);<\/span><\/p>\n<h3>\u4e03\u3001\u6027\u80fd\u4f18\u5316\u5efa\u8bae<\/h3>\n<li>\n<p>\u5757\u5927\u5c0f\u8c03\u6574&#xff1a;<\/p>\n<p> <span class=\"token keyword\">SET<\/span> lo_compat_privileges <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">off<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">&#8212; \u542f\u7528\u66f4\u7ec6\u7c92\u5ea6\u7684\u6743\u9650\u63a7\u5236<\/span>\n <\/li>\n<li>\n<p>\u4e8b\u52a1\u4f18\u5316&#xff1a;<\/p>\n<p> <span class=\"token keyword\">BEGIN<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> lo_open<span class=\"token punctuation\">(<\/span>oid<span class=\"token punctuation\">,<\/span> x<span class=\"token string\">&#039;40000&#039;<\/span>::<span class=\"token keyword\">int<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">&#8212; \u5199\u6a21\u5f0f<\/span><br \/>\n<span class=\"token comment\">&#8212; \u6279\u91cf\u64cd\u4f5c&#8230;<\/span><br \/>\n<span class=\"token keyword\">COMMIT<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">&#8212; \u6216 ROLLBACK \u81ea\u52a8\u6e05\u7406<\/span>\n <\/li>\n<li>\n<p>\u4e0e pg_largeobject \u7cfb\u7edf\u8868\u914d\u5408&#xff1a;<\/p>\n<p> <span class=\"token comment\">&#8212; \u5206\u9875\u8bfb\u53d6\u5927\u5bf9\u8c61<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> loid<span class=\"token punctuation\">,<\/span> pageno<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">data<\/span><br \/>\n<span class=\"token keyword\">FROM<\/span> pg_largeobject<br \/>\n<span class=\"token keyword\">WHERE<\/span> loid <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">12345<\/span><br \/>\n<span class=\"token keyword\">ORDER<\/span> <span class=\"token keyword\">BY<\/span> pageno<br \/>\n<span class=\"token keyword\">LIMIT<\/span> <span class=\"token number\">100<\/span> <span class=\"token keyword\">OFFSET<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span>\n <\/li>\n<h3>\u516b\u3001\u5b89\u5168\u6ce8\u610f\u4e8b\u9879<\/h3>\n<li>\n<p>\u6743\u9650\u63a7\u5236&#xff1a;<\/p>\n<p> <span class=\"token comment\">&#8212; \u6388\u4e88\u7279\u5b9a\u7528\u6237\u8bbf\u95ee\u6743\u9650<\/span><br \/>\n<span class=\"token keyword\">GRANT<\/span> <span class=\"token keyword\">SELECT<\/span> <span class=\"token keyword\">ON<\/span> LARGE OBJECT <span class=\"token number\">12345<\/span> <span class=\"token keyword\">TO<\/span> app_user<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u64a4\u9500\u6743\u9650<\/span><br \/>\n<span class=\"token keyword\">REVOKE<\/span> <span class=\"token keyword\">ALL<\/span> <span class=\"token keyword\">ON<\/span> LARGE OBJECT <span class=\"token number\">12345<\/span> <span class=\"token keyword\">FROM<\/span> <span class=\"token keyword\">public<\/span><span class=\"token punctuation\">;<\/span>\n <\/li>\n<li>\n<p>SQL\u6ce8\u5165\u9632\u62a4&#xff1a;<\/p>\n<p> <span class=\"token comment\">&#8212; \u4e0d\u5b89\u5168\u65b9\u5f0f(\u907f\u514d!)<\/span><br \/>\n<span class=\"token keyword\">EXECUTE<\/span> <span class=\"token string\">&#039;SELECT lo_import(&#039;<\/span> <span class=\"token operator\">||<\/span> user_input <span class=\"token operator\">||<\/span> <span class=\"token string\">&#039;)&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5b89\u5168\u65b9\u5f0f<\/span><br \/>\nPERFORM lo_import<span class=\"token punctuation\">(<\/span>sanitized_path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n <\/li>\n<h3>\u4e5d\u3001\u66ff\u4ee3\u65b9\u6848\u6bd4\u8f83<\/h3>\n<table>\n<tr>\u65b9\u6848\u4f18\u70b9\u7f3a\u70b9<\/tr>\n<tbody>\n<tr>\n<td>lo\u6269\u5c55<\/td>\n<td>\u539f\u751f\u652f\u6301\u3001\u4e8b\u52a1\u5b89\u5168<\/td>\n<td>\u7ba1\u7406\u590d\u6742<\/td>\n<\/tr>\n<tr>\n<td>bytea<\/td>\n<td>\u7b80\u5355\u6613\u7528<\/td>\n<td>\u9650\u52361GB<\/td>\n<\/tr>\n<tr>\n<td>\u5916\u90e8\u8868<\/td>\n<td>\u4e0d\u5360\u6570\u636e\u5e93\u7a7a\u95f4<\/td>\n<td>\u65e0\u4e8b\u52a1\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>pg_largeobject<\/td>\n<td>\u76f4\u63a5\u8bbf\u95ee<\/td>\n<td>\u4f4e\u7ea7\u522bAPI<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5bf9\u4e8e\u8d85\u8fc71GB\u7684\u5927\u5bf9\u8c61\u5b58\u50a8&#xff0c;lo\u6269\u5c55\u4ecd\u662fPostgreSQL\u4e2d\u6700\u53ef\u9760\u7684\u9009\u62e9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb339\u6b21\uff0c\u70b9\u8d5e3\u6b21\uff0c\u6536\u85cf5\u6b21\u3002lo (Large Object) \u662f PostgreSQL \u7528\u4e8e\u5b58\u50a8\u5927\u5bf9\u8c61(\u901a\u5e38\u8d85\u8fc7 1GB)\u7684\u6269\u5c55\u6a21\u5757\uff0c\u63d0\u4f9b\u5bf9\u4e8c\u8fdb\u5236\u5927\u5bf9\u8c61(BLOB)\u7684\u9ad8\u6548\u5b58\u50a8\u548c\u7ba1\u7406\u529f\u80fd\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[954,100,44],"topic":[],"class_list":["post-44378","post","type-post","status-publish","format-standard","hentry","category-server","tag-postgresql","tag-100","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL\u7684\u6269\u5c55lo - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/44378.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL\u7684\u6269\u5c55lo - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb339\u6b21\uff0c\u70b9\u8d5e3\u6b21\uff0c\u6536\u85cf5\u6b21\u3002lo (Large Object) \u662f PostgreSQL \u7528\u4e8e\u5b58\u50a8\u5927\u5bf9\u8c61(\u901a\u5e38\u8d85\u8fc7 1GB)\u7684\u6269\u5c55\u6a21\u5757\uff0c\u63d0\u4f9b\u5bf9\u4e8c\u8fdb\u5236\u5927\u5bf9\u8c61(BLOB)\u7684\u9ad8\u6548\u5b58\u50a8\u548c\u7ba1\u7406\u529f\u80fd\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/44378.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-18T09:17:40+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/44378.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/44378.html\",\"name\":\"PostgreSQL\u7684\u6269\u5c55lo - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-18T09:17:40+00:00\",\"dateModified\":\"2025-06-18T09:17:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/44378.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/44378.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/44378.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL\u7684\u6269\u5c55lo\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL\u7684\u6269\u5c55lo - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/44378.html","og_locale":"zh_CN","og_type":"article","og_title":"PostgreSQL\u7684\u6269\u5c55lo - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb339\u6b21\uff0c\u70b9\u8d5e3\u6b21\uff0c\u6536\u85cf5\u6b21\u3002lo (Large Object) \u662f PostgreSQL \u7528\u4e8e\u5b58\u50a8\u5927\u5bf9\u8c61(\u901a\u5e38\u8d85\u8fc7 1GB)\u7684\u6269\u5c55\u6a21\u5757\uff0c\u63d0\u4f9b\u5bf9\u4e8c\u8fdb\u5236\u5927\u5bf9\u8c61(BLOB)\u7684\u9ad8\u6548\u5b58\u50a8\u548c\u7ba1\u7406\u529f\u80fd\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/44378.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-18T09:17:40+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/44378.html","url":"https:\/\/www.wsisp.com\/helps\/44378.html","name":"PostgreSQL\u7684\u6269\u5c55lo - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-18T09:17:40+00:00","dateModified":"2025-06-18T09:17:40+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/44378.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/44378.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/44378.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"PostgreSQL\u7684\u6269\u5c55lo"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/44378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=44378"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/44378\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=44378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=44378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=44378"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=44378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}