用 pgvector 做 RAG:别急着上 Pinecone,你的 PostgreSQL 就够了

Posted on Tue 10 March 2026 in AI • Tagged with RAG, pgvector, PostgreSQL, embedding, vector-search, Python, AI • 8 min read

你刚写完一个 RAG demo,跑通了 OpenAI embedding + Pinecone,兴奋了三秒——然后老板问你:"这个月 Pinecone 账单多少?"于是你开始重新审视那台已经跑了三年的 PostgreSQL。好消息:装个 pgvector 扩展,它就是你的向量数据库。这篇文章给你一套从 Docker 部署到 Python 完整代码的实操指南,跑完就能用。


Continue reading

Python 编程的常见陷阱与奇巧淫技

Posted on Tue 27 January 2026 in Tech • Tagged with python, programming, tips, traps, best-practices • 6 min read

Python 入门容易精通难。这篇文章整理了 10 大经典陷阱(可变默认参数、闭包绑定、浮点精度、GIL...)和 10 小窍门(海象运算符、collections、itertools...),附带工程建议和 Checklist,帮你写出稳定、高效、可维护的 Python 代码。


Continue reading

find and grep by python

Posted on Tue 24 May 2016 in Tips • Tagged with python, tips • 2 min read

python for batch


Continue reading

A glance of Fabric

Posted on Wed 26 August 2015 in tips • Tagged with python, fabric • 1 min read

A glance of Fabric


Continue reading

Django Review 1st

Posted on Thu 05 March 2015 in Programming • Tagged with python, django • 1 min read

Django review from begining


Continue reading