现在,我在Laravel中使用dblink postgres时遇到了一个问题。
我在postgres的查询就是这样
$query = "SELECT * FROM dblink('host=localhost user=postgres password=123@123a dbname=shbbank',
'SELECT contract_ref_no,currency_iso,report_date FROM bigq.credit_data')
AS source(contract_ref_no text,currency_iso text,report_date date)"然后我在Laravel做这个查询
DB::select($query);我有错误:
未定义函数:7错误:函数dblink(未知,未知)不存在。您可能需要添加显式类型转换。
请帮我解决
发布于 2018-07-24 13:52:55
似乎还没有创建扩展dblink。
尝试通过迁移或直接在数据库上运行脚本create extension dblink。一旦创建了扩展,就可以从正确的模式使用dblink。
https://stackoverflow.com/questions/51496491
复制相似问题