Ashutosh Bapat <ashutosh.ba...@enterprisedb.com> writes: > On Mon, Mar 23, 2015 at 10:51 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Hm? We don't have scan nodes that read more than one table, so I'm >> not following your point.
> But in the text output you gave > Update on public.pt1 (cost=0.00..321.05 rows=3541 width=46) > Update on public.pt1 > Foreign Update on public.ft1 > Remote SQL: UPDATE public.ref1 SET c1 = $2 WHERE ctid = $1 > Foreign Update on public.ft2 > Remote SQL: UPDATE public.ref2 SET c1 = $2 WHERE ctid = $1 > Update on public.child3 > -> Seq Scan on public.pt1 (cost=0.00..0.00 rows=1 width=46) > Output: (pt1.c1 + 1), pt1.c2, pt1.c3, pt1.ctid > ... etc ... > For ft1 there is only Update Remote SQL. whereas for child3 you have > specified the Seq Scan as well. I think you're confused by my perhaps-overly-abbreviated example. Here's the whole output for the example in HEAD: # explain update pt1 set c1=c1+1; QUERY PLAN --------------------------------------------------------------------- Update on pt1 (cost=0.00..321.05 rows=3541 width=46) Update on pt1 Foreign Update on ft1 Foreign Update on ft2 Update on child3 -> Seq Scan on pt1 (cost=0.00..0.00 rows=1 width=46) -> Foreign Scan on ft1 (cost=100.00..148.03 rows=1170 width=46) -> Foreign Scan on ft2 (cost=100.00..148.03 rows=1170 width=46) -> Seq Scan on child3 (cost=0.00..25.00 rows=1200 width=46) (9 rows) # explain verbose update pt1 set c1=c1+1; QUERY PLAN ---------------------------------------------------------------------------- Update on public.pt1 (cost=0.00..321.05 rows=3541 width=46) Update on public.pt1 Foreign Update on public.ft1 Remote SQL: UPDATE public.ref1 SET c1 = $2 WHERE ctid = $1 Foreign Update on public.ft2 Remote SQL: UPDATE public.ref2 SET c1 = $2 WHERE ctid = $1 Update on public.child3 -> Seq Scan on public.pt1 (cost=0.00..0.00 rows=1 width=46) Output: (pt1.c1 + 1), pt1.c2, pt1.c3, pt1.ctid -> Foreign Scan on public.ft1 (cost=100.00..148.03 rows=1170 width=46) Output: (ft1.c1 + 1), ft1.c2, ft1.c3, ft1.ctid Remote SQL: SELECT c1, c2, c3, ctid FROM public.ref1 FOR UPDATE -> Foreign Scan on public.ft2 (cost=100.00..148.03 rows=1170 width=46) Output: (ft2.c1 + 1), ft2.c2, ft2.c3, ft2.ctid Remote SQL: SELECT c1, c2, c3, ctid FROM public.ref2 FOR UPDATE -> Seq Scan on public.child3 (cost=0.00..25.00 rows=1200 width=46) Output: (child3.c1 + 1), child3.c2, child3.c3, child3.ctid (17 rows) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers