I'm developing a custom extension that uses plpythonu in several functions. I'd like to be able to require that plpythonu be installed in order to create my extension, but I don't see anything in the documentation about requiring a language via the control file.

I tried adding plpythonu to the 'requires' statement in the control file but it looks for an extension named plpythonu rather than the language.

Can this be done?

  • Not as far as I know. Propose it on pgsql-hackers – Craig Ringer Sep 15 '15 at 2:29
  • Starting from PostgreSQL 9.1, most languages are installed as extensions. So unless you're working on 9.0, adding plpythonu as an extension might just work. Note here – Kassandry Sep 15 '15 at 17:52
  • @Kassandry unfortunately it doesn't work. The workaround I devised is to include a call to parse whether the language already exists and then CREATE LANGUAGE if it doesn't. A bit of a hack, but it seems to be working. – spencerrecneps Sep 16 '15 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.