PL Features Matrix

From PostgreSQL wiki
Jump to navigationJump to search

Goal of this page is to document the main features of a Procedural Language, and summarize which features each implemented language provides.

List of Features

  • accepts named args
  • returns arrays
  • returns tables
  • has a validator function
  • supports triggers
  • variadic
    • on TRUNCATE
  • Trusted mode (security)
    • Have a need for testers for trusted languages
    • We probably will not accept additional languages in core, but we may get to the point where we stop allowing non-core trusted languages
    • PL/Ruby - stuff you can turn on/off ?
  • DO block support (aka inline handlers)
  • Composite type support
  • Native types
    • ENUMs - passing it too and from a language that does or doesn't support enums
    • how does type mapping work in general?
  • SPI interface documentation
    • Cursor support
  • Subtransactions
  • Support for OUT arguments, how is it bound to the native language
  • Sharing data / global hash to allow functions to share data :) (in the same PLs)
  • Quoting functions (string escaping)
  • AUTOLOAD support (TCL, Perl has it)
    • Standardize where each PL does this (a table?)

Wishlist / Alternative architectural discussions

  • Getting functions to have introspection
  • Ability to handle internal types: text search parsers, windowing functions, aggregate functions in PLs :), -- how to expose?, extend API in backend to allow this
  • Foreign Data Wrappers
  • Streaming SRFs (tuple store discussion)
  • How to merge PL/PSM without having to duplicate 70% of the PL/pgsql code
  • Top memory context vs caching of XYZ somewhere else
    • output of a JIT stashed in memory
    • TODO: hook for a DROP FUNCTION to clean up the cache
    • boilerplate in the PL code ? -->
      • PL handler: pass a pointer to a piece of memory so you can store whatever you want
      • PL handler: also keep track of lifecycle
      • hash table support to stash the compiled version of the function
      • Tim wrote a NULL language: shell of a validator, executor


  • Publish code for PL/NULL - Tim
  • Make a list of all the boilerplate code :) - Tim, Selena will send email to -hackers about it
  • Set up a 1/2 day meeting at the next pgcon - Josh Berkus (?)
  • Set up a Skype session in a few months time to go over progress - Selena (Tim, Alvaro agreed to attend)
  • Further discussion of DDL triggers - Jan
  • Further discussion of permission system - Steve
  • Further discussion of per-statement config parameters for things like timezone - Jan

PL interface improvements

  • Can't write INPUT/OUTPUT functions in languages other than C


See PL_Matrix