{"id":1047,"date":"2026-07-14T04:18:45","date_gmt":"2026-07-14T04:18:45","guid":{"rendered":"https:\/\/hyc.eshachem.com\/program\/?p=1047"},"modified":"2026-07-15T05:04:35","modified_gmt":"2026-07-15T05:04:35","slug":"rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/","title":{"rendered":"RAG &#8211; Supabase\u64cd\u4f5c\u6d41\u7a0b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1a<a href=\"https:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74\">https:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"1024\" src=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7-930x1024.png\" alt=\"\" class=\"wp-image-1048\" srcset=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7-930x1024.png 930w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7-272x300.png 272w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7-768x846.png 768w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7-1395x1536.png 1395w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7.png 1684w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c08\u6848\u9996\u9801<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"551\" src=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-8-1024x551.png\" alt=\"\" class=\"wp-image-1049\" srcset=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-8-1024x551.png 1024w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-8-300x161.png 300w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-8-768x413.png 768w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-8-1536x826.png 1536w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-8-2048x1102.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-10-1024x548.png\" alt=\"\" class=\"wp-image-1051\" srcset=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-10-1024x548.png 1024w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-10-300x160.png 300w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-10-768x411.png 768w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-10-1536x822.png 1536w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-10-2048x1095.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.env.local<\/code><\/li>\n<\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO\nNEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh\nNEXT_PUBLIC_SUPABASE_URL = https:<span class=\"hljs-comment\">\/\/ejggsyxwsltpypfrfdcq.supabase.co<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ul class=\"wp-block-list\">\n<li>\u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-12-1024x412.png\" alt=\"\" class=\"wp-image-1054\" srcset=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-12-1024x412.png 1024w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-12-300x121.png 300w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-12-768x309.png 768w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-12-1536x618.png 1536w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-12-2048x823.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql<\/li>\n<\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">do<\/span> $$\n<span class=\"hljs-keyword\">declare<\/span> r record;\nbegin\n  <span class=\"hljs-keyword\">for<\/span> r in (\n    select policyname from pg_policies\n    where schemaname = <span class=\"hljs-string\">'public'<\/span> <span class=\"hljs-keyword\">and<\/span> tablename = <span class=\"hljs-string\">'documents'<\/span>\n  ) loop\n    execute format(<span class=\"hljs-string\">'drop policy if exists %I on public.documents'<\/span>, r.policyname);\n  end loop;\nend $$;\n\nalter table <span class=\"hljs-keyword\">public<\/span>.documents disable row level security;\ngrant all on table <span class=\"hljs-keyword\">public<\/span>.documents to anon, authenticated, service_role;\ngrant usage, select on sequence documents_id_seq to anon, authenticated, service_role;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u7576\u4f60\u5728localhost3000\u5411AI\u8a62\u554f\u554f\u984c\u5f8c\uff0c\u524d\u5f80 supabase\u67e5\u770b\u6703\u770b\u5230\u5207\u5206\u5f8c\u7684md<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"528\" src=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-13-1024x528.png\" alt=\"\" class=\"wp-image-1055\" srcset=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-13-1024x528.png 1024w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-13-300x155.png 300w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-13-768x396.png 768w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-13-1536x791.png 1536w, https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-13-2048x1055.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local \u7576\u4f60\u5728localhost3000\u5411AI\u8a62\u554f\u554f\u984c\u5f8c\uff0c\u524d\u5f80 supabase\u67e5\u770b\u6703\u770b\u5230\u5207\u5206\u5f8c\u7684md<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[41],"tags":[],"class_list":["post-1047","post","type-post","status-publish","format-standard","hentry","category-notes"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = &#039;public&#039; and tablename = &#039;documents&#039; ) loop execute format(&#039;drop policy if exists %I\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"H.Y. Chen\"\/>\n\t<meta name=\"google-site-verification\" content=\"-324YR5tomynX5FeTW2lTMHIX0KmPBvpxjXpOhXwi1Q\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"HyC Wiki - Technical articles\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki\" \/>\n\t\t<meta property=\"og:description\" content=\"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = &#039;public&#039; and tablename = &#039;documents&#039; ) loop execute format(&#039;drop policy if exists %I\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/06\/cropped-cropped-\u672a\u547d\u540d\u8a2d\u8a08-4.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/06\/cropped-cropped-\u672a\u547d\u540d\u8a2d\u8a08-4.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"64\" \/>\n\t\t<meta property=\"og:image:height\" content=\"64\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-14T04:18:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-15T05:04:35+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki\" \/>\n\t\t<meta name=\"twitter:description\" content=\"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = &#039;public&#039; and tablename = &#039;documents&#039; ) loop execute format(&#039;drop policy if exists %I\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/06\/cropped-cropped-\u672a\u547d\u540d\u8a2d\u8a08-4.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#blogposting\",\"name\":\"RAG \\u2013 Supabase\\u64cd\\u4f5c\\u6d41\\u7a0b - HyC Wiki\",\"headline\":\"RAG &#8211; Supabase\\u64cd\\u4f5c\\u6d41\\u7a0b\",\"author\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/author\\\/hychen\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/image-7.png\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#articleImage\",\"width\":1684,\"height\":1854},\"datePublished\":\"2026-07-14T04:18:45+00:00\",\"dateModified\":\"2026-07-15T05:04:35+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#webpage\"},\"articleSection\":\"Notes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/category\\\/notes\\\/#listItem\",\"name\":\"Notes\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/category\\\/notes\\\/#listItem\",\"position\":2,\"name\":\"Notes\",\"item\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/category\\\/notes\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#listItem\",\"name\":\"RAG &#8211; Supabase\\u64cd\\u4f5c\\u6d41\\u7a0b\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#listItem\",\"position\":3,\"name\":\"RAG &#8211; Supabase\\u64cd\\u4f5c\\u6d41\\u7a0b\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/category\\\/notes\\\/#listItem\",\"name\":\"Notes\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/#person\",\"name\":\"H.Y. Chen\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fc6e05e080c9ea570267ee9ed68c8b1841d745cee07c0331c5440646e0646603?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"H.Y. Chen\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/author\\\/hychen\\\/#author\",\"url\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/author\\\/hychen\\\/\",\"name\":\"H.Y. Chen\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fc6e05e080c9ea570267ee9ed68c8b1841d745cee07c0331c5440646e0646603?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"H.Y. Chen\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#webpage\",\"url\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/\",\"name\":\"RAG \\u2013 Supabase\\u64cd\\u4f5c\\u6d41\\u7a0b - HyC Wiki\",\"description\":\"PostGreSQL \\u7c21\\u4ecb\\u8207\\u57fa\\u790e\\u64cd\\u4f5c\\uff1ahttps:\\\/\\\/eminent-glider-8c3.notion.site\\\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \\u5275\\u5efa\\u8cec\\u865f\\u4e26\\u767b\\u5165 \\u5c08\\u6848\\u9996\\u9801 \\u524d\\u5f80project setting\\u8907\\u88fdAPI key\\u8207\\u5c08\\u6848 id \\uff0c\\u8a18\\u5f97\\u5728\\u672c\\u5730\\u5efa\\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\\\/\\\/ejggsyxwsltpypfrfdcq.supabase.co \\u63a5\\u8457\\u5728SQL Editor\\u4e2d\\u57f7\\u884c db\\\/query.sql \\u5728SQL Editor\\u4e2d\\u958b\\u7b2c\\u4e8c\\u500bquery\\uff0c\\u57f7\\u884c db\\\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = 'public' and tablename = 'documents' ) loop execute format('drop policy if exists %I\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/author\\\/hychen\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/author\\\/hychen\\\/#author\"},\"datePublished\":\"2026-07-14T04:18:45+00:00\",\"dateModified\":\"2026-07-15T05:04:35+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/#website\",\"url\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/\",\"name\":\"HyC Wiki\",\"description\":\"Technical articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/hyc.eshachem.com\\\/program\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki","description":"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = 'public' and tablename = 'documents' ) loop execute format('drop policy if exists %I","canonical_url":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"-324YR5tomynX5FeTW2lTMHIX0KmPBvpxjXpOhXwi1Q","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#blogposting","name":"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki","headline":"RAG &#8211; Supabase\u64cd\u4f5c\u6d41\u7a0b","author":{"@id":"https:\/\/hyc.eshachem.com\/program\/author\/hychen\/#author"},"publisher":{"@id":"https:\/\/hyc.eshachem.com\/program\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/07\/image-7.png","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#articleImage","width":1684,"height":1854},"datePublished":"2026-07-14T04:18:45+00:00","dateModified":"2026-07-15T05:04:35+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#webpage"},"isPartOf":{"@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#webpage"},"articleSection":"Notes"},{"@type":"BreadcrumbList","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program#listItem","position":1,"name":"Home","item":"https:\/\/hyc.eshachem.com\/program","nextItem":{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program\/category\/notes\/#listItem","name":"Notes"}},{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program\/category\/notes\/#listItem","position":2,"name":"Notes","item":"https:\/\/hyc.eshachem.com\/program\/category\/notes\/","nextItem":{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#listItem","name":"RAG &#8211; Supabase\u64cd\u4f5c\u6d41\u7a0b"},"previousItem":{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#listItem","position":3,"name":"RAG &#8211; Supabase\u64cd\u4f5c\u6d41\u7a0b","previousItem":{"@type":"ListItem","@id":"https:\/\/hyc.eshachem.com\/program\/category\/notes\/#listItem","name":"Notes"}}]},{"@type":"Person","@id":"https:\/\/hyc.eshachem.com\/program\/#person","name":"H.Y. Chen","image":{"@type":"ImageObject","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/fc6e05e080c9ea570267ee9ed68c8b1841d745cee07c0331c5440646e0646603?s=96&d=mm&r=g","width":96,"height":96,"caption":"H.Y. Chen"}},{"@type":"Person","@id":"https:\/\/hyc.eshachem.com\/program\/author\/hychen\/#author","url":"https:\/\/hyc.eshachem.com\/program\/author\/hychen\/","name":"H.Y. Chen","image":{"@type":"ImageObject","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/fc6e05e080c9ea570267ee9ed68c8b1841d745cee07c0331c5440646e0646603?s=96&d=mm&r=g","width":96,"height":96,"caption":"H.Y. Chen"}},{"@type":"WebPage","@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#webpage","url":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/","name":"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki","description":"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = 'public' and tablename = 'documents' ) loop execute format('drop policy if exists %I","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/hyc.eshachem.com\/program\/#website"},"breadcrumb":{"@id":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/#breadcrumblist"},"author":{"@id":"https:\/\/hyc.eshachem.com\/program\/author\/hychen\/#author"},"creator":{"@id":"https:\/\/hyc.eshachem.com\/program\/author\/hychen\/#author"},"datePublished":"2026-07-14T04:18:45+00:00","dateModified":"2026-07-15T05:04:35+00:00"},{"@type":"WebSite","@id":"https:\/\/hyc.eshachem.com\/program\/#website","url":"https:\/\/hyc.eshachem.com\/program\/","name":"HyC Wiki","description":"Technical articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/hyc.eshachem.com\/program\/#person"}}]},"og:locale":"en_US","og:site_name":"HyC Wiki - Technical articles","og:type":"article","og:title":"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki","og:description":"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = 'public' and tablename = 'documents' ) loop execute format('drop policy if exists %I","og:url":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/","og:image":"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/06\/cropped-cropped-\u672a\u547d\u540d\u8a2d\u8a08-4.png","og:image:secure_url":"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/06\/cropped-cropped-\u672a\u547d\u540d\u8a2d\u8a08-4.png","og:image:width":64,"og:image:height":64,"article:published_time":"2026-07-14T04:18:45+00:00","article:modified_time":"2026-07-15T05:04:35+00:00","twitter:card":"summary_large_image","twitter:title":"RAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b - HyC Wiki","twitter:description":"PostGreSQL \u7c21\u4ecb\u8207\u57fa\u790e\u64cd\u4f5c\uff1ahttps:\/\/eminent-glider-8c3.notion.site\/PostgreSQL-39e9def5443d807ba034dcbf3b8ab46e?pvs=74 \u5275\u5efa\u8cec\u865f\u4e26\u767b\u5165 \u5c08\u6848\u9996\u9801 \u524d\u5f80project setting\u8907\u88fdAPI key\u8207\u5c08\u6848 id \uff0c\u8a18\u5f97\u5728\u672c\u5730\u5efa\u7acb.env.local .env.local SUPABASE_SERVICE_ROLE_KEY = eyJhbGciO NEXT_PUBLIC_SUPABASE_ANON_KEY = eyJh NEXT_PUBLIC_SUPABASE_URL = https:\/\/ejggsyxwsltpypfrfdcq.supabase.co \u63a5\u8457\u5728SQL Editor\u4e2d\u57f7\u884c db\/query.sql \u5728SQL Editor\u4e2d\u958b\u7b2c\u4e8c\u500bquery\uff0c\u57f7\u884c db\/RLS.sql do $$ declare r record; begin for r in ( select policyname from pg_policies where schemaname = 'public' and tablename = 'documents' ) loop execute format('drop policy if exists %I","twitter:image":"https:\/\/hyc.eshachem.com\/program\/wp-content\/uploads\/2026\/06\/cropped-cropped-\u672a\u547d\u540d\u8a2d\u8a08-4.png"},"aioseo_meta_data":{"post_id":"1047","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-07-28 14:34:07","updated":"2026-07-28 14:34:07"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/hyc.eshachem.com\/program\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/hyc.eshachem.com\/program\/category\/notes\/\" title=\"Notes\">Notes<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRAG \u2013 Supabase\u64cd\u4f5c\u6d41\u7a0b\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/hyc.eshachem.com\/program"},{"label":"Notes","link":"https:\/\/hyc.eshachem.com\/program\/category\/notes\/"},{"label":"RAG &#8211; Supabase\u64cd\u4f5c\u6d41\u7a0b","link":"https:\/\/hyc.eshachem.com\/program\/rag-supabase%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b\/"}],"views":43,"_links":{"self":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/posts\/1047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/comments?post=1047"}],"version-history":[{"count":5,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":1101,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/posts\/1047\/revisions\/1101"}],"wp:attachment":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/media?parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/categories?post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/tags?post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}