Redshift UDF兼容性问题

时间:2017-11-11 10:29:03

标签: amazon-redshift

我正在尝试安装此页面上提到的功能...

https://en.wikibooks.org/wiki/Algorithm_Implementation/Checksums/Verhoeff_Algorithm#plpgsql

它适用于除Redshift之外的所有平台。我收到了错误......

Error in query: ERROR: Create Function is not supported for language plpgsql.

如何使此功能与redshift兼容?

1 个答案:

答案 0 :(得分:2)

您收到此错误,因为Redshift不支持plpgsql。

这里解释了你在Redshift中可以做什么: http://docs.aws.amazon.com/redshift/latest/dg/user-defined-functions.html

我认为你需要使用Redshift plpythonu函数,你可以在你发布的链接上看到代码的python版本。你只需将它包装在plpythonu中。