PostgreSQL Functions By Example - joeconway.com
OverviewFunction BasicsBy ExamplePostgreSQL Functions By ExampleJoe GroupJanuary 20, 2012Joe ConwaySCALE10X-PGDayOverviewFunction BasicsBy ExampleIntroductionUsesVarietiesLanguage sWhat are Functions ?Full fledged SQL objectsMany other database objects are implemented with themFundamental part of PostgreSQL s system architectureCreated withCREATE FUNCTIONExecuted through normal SQLtarget-list:SELECT myfunc(f1) FROM foo;FROM clause:SELECT * FROM myfunc();WHERE clause:SELECT * FROM foo WHERE myfunc(f1) = 42;Joe ConwaySCALE10X-PGDayOverviewFunction BasicsBy ExampleIntroductionUsesVarietiesLanguage sHow are they Used?FunctionsOperatorsData typesIndex methodsCastsTriggersAggregatesJoe ConwaySCALE10X-PGDayOverviewFunction BasicsBy ExampleIntroductionUsesVarietiesLanguage sWhat Forms Can They Take? PostgreSQL provides four kinds of Functions :SQLProcedural LanguagesInternalC-languageArgumentsBase , composite, or combinationsScalar or arrayPseudo or polymorphicVARIADICIN/OUT/INOUTReturnSin gleton or set (SETOF)Base or composite typePseudo or ConwaySCALE10X-PGDayOverviewFunction BasicsBy ExampleIntroductionUsesVarietiesLanguage sSQL FunctionsBehaviorExecutes an arbitrary list of SQL statements separated bysemicolonsLast statement may be INSERT, UPDATE, or DELETE withRETURNING clauseArgumentsReferenced by function body using $n: $1 is first arg, etc.
Overview Function Basics By Example Introduction Uses Varieties Languages What are Functions? Full edged SQL objects Many other database objects are implemented with them
Download PostgreSQL Functions By Example - joeconway.com
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
Related search queries
ArcSDE Administration for PostgreSQL, PostgreSQL, PostgreSQL Installation Guide, Security Best Practices for Postgres, Using the NoSQL Capabilities in Postgres, Converting from SAS® Table Server to a PostgreSQL Database, Server to a PostgreSQL Database, PostgreSQL: Introduction and Concepts, PostgreSQL Introduction and Concepts, Introduction, Hacking PostgreSQL, Internals Of PostgreSQL