Unix Technical Forum

Re: Are JOINs allowed with DELETE FROM

This is a discussion on Re: Are JOINs allowed with DELETE FROM within the Pgsql Performance forums, part of the PostgreSQL category; --> Steven Rosenstein <srosenst@us.ibm.com> writes: > Thank you for the link to the documentation page. I forgot to mention that ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:05 AM
Tom Lane
 
Posts: n/a
Default Re: Are JOINs allowed with DELETE FROM

Steven Rosenstein <srosenst@us.ibm.com> writes:
> Thank you for the link to the documentation page. I forgot to mention that
> we're still using version 7.3. When I checked the 7.3 documentation for
> DELETE, there was no mention of being able to use fields from different
> tables in a WHERE clause. This feature must have been added in a
> subsequent release of PostgreSQL.


No, it's been there all along, if perhaps not well documented.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:05 AM
Steven Rosenstein
 
Posts: n/a
Default Re: Are JOINs allowed with DELETE FROM





Many thanks to Gaetano Mendola and Tom Lane for the hints about using
fields from other tables in a DELETE's WHERE clause. That was the magic
bullet I needed, and my application is working as expected.

--- Steve
__________________________________________________ _________________________________

Steven Rosenstein
IT Architect/Developer | IBM Virtual Server Administration
Voice/FAX: 845-689-2064 | Cell: 646-345-6978 | Tieline: 930-6001
Text Messaging: 6463456978 @ mobile.mycingular.com
Email: srosenst @ us.ibm.com

"Learn from the mistakes of others because you can't live long enough to
make them all yourself." -- Eleanor Roosevelt



Tom Lane
<tgl@sss.pgh.pa.u
s> To
Sent by: Steven Rosenstein/New
pgsql-performance York/IBM@IBMUS
-owner@postgresql cc
.org pgsql-performance@postgresql.org
Subject
Re: [PERFORM] Are JOINs allowed
02/06/2005 02:49 with DELETE FROM
PM









Steven Rosenstein <srosenst@us.ibm.com> writes:
> Thank you for the link to the documentation page. I forgot to mention

that
> we're still using version 7.3. When I checked the 7.3 documentation for
> DELETE, there was no mention of being able to use fields from different
> tables in a WHERE clause. This feature must have been added in a
> subsequent release of PostgreSQL.


No, it's been there all along, if perhaps not well documented.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com