[prev] 12 [next]

PostgreSQL Functionality (cont)

PostgreSQL stored procedures differ from SQL standard:
  • only provides functions, not procedures
    (but functions can return void, effectively a procedure)
  • allows function overloading
    (same function name, different argument types)
  • defined at different "lexical level" to SQL
  • provides own PL/SQL-like language for functions

create function ( Args ) returns ResultType
as $$
... body of function definition ...
$$ language FunctionBodyLanguage;

  • where each Arg has a Name and Type