と思ったらソースビルドしてるとビルドからやり直しの様子…
[postgres@localhost ~]$ createlang --list
Procedural Languages
  Name   | Trusted?
---------+----------
 plpgsql | yes

[postgres@localhost ~]$
しょーがねええええええなーーーーーー

あれconfigureコケた
checking for Python.h... no
configure: error: header file  is required for Python
ふーん。というわけでpython-devel入れる
[root@localhost postgresql-9.3.3]# yum search python-dev
…
========================================================================================================== N/S Matched: python-dev ===========================================================================================================
dbus-python-devel.x86_64 : Libraries and headers for dbus-python
gstreamer-python-devel.x86_64 : Headers for developing programs that will use gstreamer-python
python-devel.i686 : The libraries and header files needed for Python development
python-devel.x86_64 : The libraries and header files needed for Python development
えいや!
[root@localhost postgresql-9.3.3]# yum install python-devel.x86_64
…
[root@localhost postgresql-9.3.3]# make clean
…
[root@localhost postgresql-9.3.3]# ./configure --prefix=/usr/local/postgresql-9.3.3 --with-openssl --with-python
[root@localhost postgresql-9.3.3]# gmake && gmake install
…
 
testってDBで有効にする
[postgres@localhost ~]$ psql test
psql (9.3.3)
Type "help" for help.

test=# create extension plpythonu;
CREATE EXTENSION
test=# \q
[postgres@localhost ~]$ createlang --list
Procedural Languages
  Name   | Trusted?
---------+----------
 plpgsql | yes

[postgres@localhost ~]$ createlang --list test
 Procedural Languages
   Name    | Trusted?
-----------+----------
 plpgsql   | yes
 plpythonu | no
ない!と思いきやDB指定してなかった。 良かったよかった。
とりあえずこれでやりたかったことは次回のAdvent Calendar で…
 

Add Comments

名前
URL
 
  絵文字
 
 

Trackback URL

livedoor プロフィール
Twitter
instagram(SnapWidget)
タグクラウド
  • ライブドアブログ