From 1d763d9107eda2db054d0f7edee4c2e9b55dfacf Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sun, 22 Jan 2006 05:20:35 +0000 Subject: Allow an optional alias for the target table to be specified for UPDATE and DELETE. If specified, the alias must be used instead of the full table name. Also, the alias currently cannot be used in the SET clause of UPDATE. Patch from Atsushi Ogawa, various editorialization by Neil Conway. Along the way, make the rowtypes regression test pass if add_missing_from is enabled, and add a new (skeletal) regression test for DELETE. --- doc/src/sgml/ref/delete.sgml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'doc/src/sgml/ref/delete.sgml') diff --git a/doc/src/sgml/ref/delete.sgml b/doc/src/sgml/ref/delete.sgml index 8369d991372..b61e6cacd21 100644 --- a/doc/src/sgml/ref/delete.sgml +++ b/doc/src/sgml/ref/delete.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DELETE FROM [ ONLY ] table +DELETE FROM [ ONLY ] table [ [ AS ] alias ] [ USING usinglist ] [ WHERE condition ] @@ -91,6 +91,19 @@ DELETE FROM [ ONLY ] table + + alias + + + A substitute name for the target table. When an alias is + provided, it completely hides the actual name of the table. For + example, given DELETE FROM foo AS f, the remainder + of the DELETE statement must refer to this + table as f not foo. + + + + usinglist -- cgit v1.2.3