postgres
和python3
都已经安装在我的High Sierra
系统上-因此尝试了以下操作:
brew upgrade postgres --with-python
我以为--with-python
应该安装了 postgres plpython3u语言支持。但是它试图[重新]安装python本身。
/usr/local/Cellar/sqlite/3.26.0: 11 files, 3.7MB
==> Installing postgresql dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.2.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring python-3.7.2.high_sierra.bottle.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Directory not empty @ dir_s_rmdir - /usr/local/opt/python3
Error: Directory not empty @ dir_s_rmdir - /usr/local/opt/python3
然后,当尝试加载plpython3u
时,我们会看到:
19:44:24/sbgmaster2 $psql
psql (10.3)
Type "help" for help.
myuser=# CREATE LANGUAGE plpython3u;
ERROR: could not access file "$libdir/plpython3": No such file or directory
那如何安装plpyton3u
?
注意:这是关于编程(关于主题的 ),因为这是使用 UDF 的-user defined functions
纯粹是为了编程。