Multicorn 是一个 PostgreSQL 9.1+ 的扩展模块,用于简化外部数据封装开发,允许开发者使用 Python 编程语言开发。
特性:
支持的数据源包括:
示例代码:
create foreign table gmail ( "Message-ID" character varying, "From" character varying, "Subject" character varying, "payload" character varying, "flags" character varying[], "To" character varying) server multicorn_imap options ( host 'imap.gmail.com', port '465', payload_column 'payload', flags_column 'flags', ssl 'True', login 'mylogin', password 'mypassword' ); select flags, "Subject", payload from gmail where "From" like 'pgsql-%' and "Subject" like '%Daily digest%' limit 2;