<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=SQL%2FPSM</id>
	<title>SQL/PSM - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=SQL%2FPSM"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=SQL/PSM&amp;action=history"/>
	<updated>2026-05-04T16:59:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=SQL/PSM&amp;diff=4827877&amp;oldid=prev</id>
		<title>imported&gt;WikiCleanerBot: v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=SQL/PSM&amp;diff=4827877&amp;oldid=prev"/>
		<updated>2023-06-03T20:38:00Z</updated>

		<summary type="html">&lt;p&gt;v2.05b - &lt;a href=&quot;/wiki143/index.php?title=User:WikiCleanerBot&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:WikiCleanerBot (page does not exist)&quot;&gt;Bot T20 CW#61&lt;/a&gt; - Fix errors for &lt;a href=&quot;/wiki143/index.php?title=WP:WCW&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:WCW (page does not exist)&quot;&gt;CW project&lt;/a&gt; (Reference before punctuation)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{infobox programming language&lt;br /&gt;
| name                   = SQL/PSM&lt;br /&gt;
| logo                   =&lt;br /&gt;
| paradigm               = [[multi-paradigm programming language|Multi-paradigm]]&lt;br /&gt;
| year                   = 1996&lt;br /&gt;
| designer               =&lt;br /&gt;
| developer              =&lt;br /&gt;
| latest_release_version = [[SQL:2023]]&lt;br /&gt;
| latest_release_date    = &lt;br /&gt;
| latest_preview_version = &lt;br /&gt;
| latest_preview_date    = &lt;br /&gt;
| turing-complete        = Yes&lt;br /&gt;
| typing                 = &lt;br /&gt;
| implementations        = [[PL/SQL]]&amp;lt;br/&amp;gt; [[MySQL]]/[[MariaDB]] &amp;lt;br /&amp;gt;IBM&amp;#039;s [[SQL PL]]&amp;lt;br /&amp;gt;[[Mimer SQL]]&lt;br /&gt;
| influenced_by          = [[PL/SQL]] &amp;lt;br /&amp;gt; [[Ada (programming language)|Ada]]&amp;lt;ref&amp;gt;{{Citation | url = http://ocelot.ca/blog/blog/2015/01/15/stored-procedures-critiques-and-defences/ | title = Stored Procedures: critiques and defences | year = 2015 | first1 = Peter | last1 = Gulutzan }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| influenced             = &lt;br /&gt;
| operating_system       = [[Cross-platform|Cross-platform (multi-platform)]]&lt;br /&gt;
| license                =&lt;br /&gt;
| website                = &lt;br /&gt;
| file_ext               =&lt;br /&gt;
| dialects               =&lt;br /&gt;
| wikibooks              = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SQL/PSM&amp;#039;&amp;#039;&amp;#039; ([[SQL]]/Persistent Stored Modules) is an [[ISO standard]] mainly defining an extension of SQL with a [[procedural language]] for use in [[stored procedure]]s. Initially published in 1996 as an extension of [[SQL-92]] (ISO/IEC 9075-4:1996, a version sometimes called PSM-96 or even SQL-92/PSM&amp;lt;ref&amp;gt;{{Cite journal | last1 = Eisenberg | first1 = A. | title = New standard for stored procedures in SQL | doi = 10.1145/245882.245907 | journal = ACM SIGMOD Record | volume = 25 | issue = 4 | pages = 81–88| year = 1996 | s2cid = 13023149 | doi-access = free }}&amp;lt;/ref&amp;gt;), SQL/PSM was later incorporated into the multi-part [[SQL:1999]] standard, and has been part 4 of that standard since then, most recently in [[SQL:2023]].&amp;lt;ref&amp;gt;{{Citation | url = https://www.iso.org/standard/76585.html | contribution = SQL:2023 | title = Catalogue | publisher = ISO | format = webshop}}&amp;lt;/ref&amp;gt;  The SQL:1999 part 4 covered less than the original PSM-96 because the SQL statements for defining, managing, and invoking routines were actually incorporated into part 2 SQL/Foundation, leaving only the procedural language itself as SQL/PSM.&amp;lt;ref&amp;gt;{{cite book| first1 = Jim| last1 = Melton| first2 = Alan R| last2 = Simon| title = SQL: 1999| year = 2002| publisher = Morgan Kaufmann| isbn = 978-1-55860-456-8| pages = [https://archive.org/details/sql1999understan0000melt/page/541 541–42]| url-access = registration| url = https://archive.org/details/sql1999understan0000melt/page/541}}&amp;lt;/ref&amp;gt; The SQL/PSM facilities are still optional as far as the SQL standard is concerned; most of them are grouped in Features P001-P008.&lt;br /&gt;
&lt;br /&gt;
SQL/PSM standardizes syntax and semantics for [[control flow]], [[exception handling]] (called &amp;quot;condition handling&amp;quot; in SQL/PSM), local variables, assignment of expressions to variables and parameters, and (procedural) use of [[Cursor (databases)|cursors]]. It also defines an information schema ([[metadata]]) for stored procedures.  SQL/PSM is one language in which [[Method (computer programming)|methods]] for the SQL:1999 [[structured type]]s can be defined.  The other is Java, via [[SQL/JRT]].&lt;br /&gt;
&lt;br /&gt;
SQL/PSM is derived, seemingly directly, from Oracle&amp;#039;s [[PL/SQL]].  Oracle developed PL/SQL and released it in 1991, basing the language on the [[United States Department of Defense|US Department of Defense]]&amp;#039;s [[Ada (programming language)|Ada programming language]]. However, Oracle has maintained a distance from the standard in its documentation. IBM&amp;#039;s [[SQL PL]] (used in DB2) and [[Mimer SQL]]&amp;#039;s PSM&amp;lt;ref&amp;gt;{{Cite web|url=https://developer.mimer.com/article/stored-procedures-in-mimer-sql/|title = Stored Procedures in Mimer SQL}}&amp;lt;/ref&amp;gt; were the first two products officially implementing SQL/PSM. It is commonly thought that these two languages, and perhaps also [[MySQL]]/[[MariaDB]]&amp;#039;s procedural language, are closest to the SQL/PSM standard.&lt;br /&gt;
&amp;lt;ref name = &amp;quot;HarrisonFeuerstein2008&amp;quot;&amp;gt;{{cite book | first1 = Guy | last1 = Harrison| first2 = Steven | last2 = Feuerstein|title=MySQL Stored Procedure Programming|url= https://books.google.com/books?id=YpeP0ok0cO4C&amp;amp;pg=PT75 | year=2008|publisher=O&amp;#039;Reilly |isbn = 978-0-596-10089-6 |page= 49}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;MariaDB Stored Procedure&amp;quot;&amp;gt;{{Cite web|url=https://mariadb.com/kb/en/library/stored-procedures/|title=Stored Procedures|website=MariaDB KnowledgeBase}}&amp;lt;/ref&amp;gt;  However, a [[PostgreSQL]] addon implements SQL/PSM&amp;lt;ref&amp;gt;{{Citation | url = https://github.com/okbob/plpsm0 | format = git | type = repository | title = plpsm0| date = 7 July 2020 }}.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Citation | publisher = PostgreSQL | url = http://www.postgresql.org/message-id/1305291347.14548.13.camel@jara.office.nic.cz | date = May 2011 | title = Announce}}.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=https://www.postgresql.org/message-id/CAFj8pRDWFdcjNSnwQB_3j1-rMO6b8=TmLTNBvDCSpRrOW2Dfeg@mail.gmail.com|title=PostgreSQL: Proposal: PL/pgPSM for 9.3|website=www.postgresql.org|date=22 February 2012}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Citation | title = SQL/PSM | format = wigl | url = http://postgres.cz/wiki/SQL/PSM_Manual | publisher = PostgreSQL | type = manual | year = 2008}}.&amp;lt;/ref&amp;gt; (alongside its other procedural languages like the PL/SQL-derived plpgsql), although it is not part of the core product.&amp;lt;ref&amp;gt;{{Citation | contribution-url = http://www.postgresql.org/docs/9.2/static/features.html | publisher = PostgreSQL | title = Documentation | edition = 9.2 | contribution = SQL Conformance}}.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Resource Description Framework|RDF]] functionality in [[Virtuoso Universal Server|OpenLink Virtuoso]] was developed entirely through SQL/PSM, combined with custom datatypes (e.g., &amp;lt;code&amp;gt;ANY&amp;lt;/code&amp;gt; for handling URI and Literal relation objects), sophisticated indexing, and flexible physical storage choices (column-wise or row-wise).&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
The following implementations adopt the standard, but they are not 100% compatible to SQL/PSM:&lt;br /&gt;
&lt;br /&gt;
[[Open source]]:&lt;br /&gt;
* [[HSQLDB]] stored procedures and functions&amp;lt;ref name=&amp;quot;SQL/PSM routines&amp;quot;&amp;gt;{{Cite web|url=http://hsqldb.org/doc/2.0/guide/sqlroutines-chapt.html#src_psm_routines|title=Chapter 8. SQL-Invoked Routines|website=hsqldb.org}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[MySQL]] stored procedures&amp;lt;ref name=&amp;quot;HarrisonFeuerstein2008&amp;quot; /&amp;gt;&lt;br /&gt;
* [[MariaDB]] stored procedures&amp;lt;ref name=&amp;quot;MariaDB Stored Procedure&amp;quot; /&amp;gt;&lt;br /&gt;
* [[Virtuoso Universal Server|OpenLink Virtuoso]] SQL Procedures (VSP)&amp;lt;ref name=&amp;quot;SQL Procedure Language Guide&amp;quot;&amp;gt;{{Cite web|url=http://docs.openlinksw.com/virtuoso/ch-sqlprocedures/|title=Chapter 11. SQL Procedure Language Guide|website=docs.openlinksw.com}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[PostgreSQL]] [[PL/pgSQL]]&lt;br /&gt;
&lt;br /&gt;
Proprietary:&lt;br /&gt;
* [[Oracle Database|Oracle]] [[PL/SQL]]&lt;br /&gt;
* [[Microsoft SQL Server|Microsoft]] and [[Sybase ASE|Sybase]] [[Transact-SQL]]&lt;br /&gt;
* Invantive Procedural SQL&amp;lt;ref&amp;gt;{{Cite web|url=https://documentation.invantive.com/2017R2/invantive-sql-grammar/invantive-sql-grammar-17.30.html#pSqlBlock|title=Invantive SQL v2.0 Grammar|website=Invantive}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[Mimer SQL]] stored procedures &amp;lt;ref name=&amp;quot;Mimer SQL PSM&amp;quot;&amp;gt;{{Cite web|url=https://docs.mimer.com/MimerSqlManual/latest/Manuals/PSM/PSM.htm|title=Mimer SQL Stored Procedures|website=docs.mimer.com}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
* Jim Melton, &amp;#039;&amp;#039;Understanding SQL&amp;#039;s Stored Procedures: A Complete Guide to SQL/PSM&amp;#039;&amp;#039;, Morgan Kaufmann Publishers, 1998, {{ISBN|1-55860-461-8}}&lt;br /&gt;
&lt;br /&gt;
{{SQL}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:SQL PSM}}&lt;br /&gt;
[[Category:Data management]]&lt;br /&gt;
[[Category:SQL]]&lt;br /&gt;
[[Category:Data-centric programming languages]]&lt;br /&gt;
[[Category:Programming languages created in 1996]]&lt;/div&gt;</summary>
		<author><name>imported&gt;WikiCleanerBot</name></author>
	</entry>
</feed>