import postgres from 'postgres'; if (!process.env.DB_URL) throw new Error('DB_URL is required'); const client = postgres(process.env.DB_URL, { max: 1 }); try { const [row] = await client`select current_setting('server_version_num')::integer as version`; console.log(row.version); } finally { await client.end(); }