they have several ways to write extensions: extensions and fdw, so you can build your cool AI stuff without digging into PgSQL sources much.