【发布时间】:2016-09-02 19:06:32
【问题描述】:
我正在使用 DBI 包从 R 中访问 Amazon Redshift DB (PostgresSQL)。我尝试定义这个开源函数Colpivot来转置一个表:
colpivot.string <- "create or replace function colpivot(
out_table varchar, in_query varchar, ...."
dbGetQuery(con, colpivot.string)
我的错误:
postgresqlExecStatement(conn, statement, ...) 中的错误: RS-DBI 驱动程序:(无法检索结果:错误:语言 plpgsql 不支持创建函数。
如何定义这个函数并通过 R 在我的 redshift 表上使用它?谢谢!
【问题讨论】:
标签: r postgresql amazon-redshift r-dbi