X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 536859DC847 for ; Mon, 16 Jan 2006 19:51:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74632-01 for ; Mon, 16 Jan 2006 19:51:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.206]) by postgresql.org (Postfix) with ESMTP id 7FA329DC83B for ; Mon, 16 Jan 2006 19:51:00 -0400 (AST) Received: by xproxy.gmail.com with SMTP id s14so968271wxc for ; Mon, 16 Jan 2006 15:51:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=PbEn286NZdZ019wJlxajJ/Mrbg9au9G+TBs5C7krkbe8hwTqVIJDTtKZAFgKaIH/LmUGnLpPzokgQ+TwzXIw1glbW88UFo8vdiYYLM4m1sOGulegIRuFOsrv9bNbMd/h3wkLvt6e/ASs9DiHqJzVp9fSjjgjACg5ADO01/Yd/kI= Received: by 10.70.25.12 with SMTP id 12mr8673006wxy; Mon, 16 Jan 2006 15:51:03 -0800 (PST) Received: by 10.70.44.7 with HTTP; Mon, 16 Jan 2006 15:51:03 -0800 (PST) Message-ID: <34608c0c0601161551q3207bf82p@mail.gmail.com> Date: Tue, 17 Jan 2006 00:51:03 +0100 From: =?ISO-8859-1?Q?Ott=F3_Havasv=F6lgyi?= To: =?ISO-8859-1?Q?Ott=F3_Havasv=F6lgyi?= , pgsql-sql@postgresql.org Subject: Re: For update In-Reply-To: <34608c0c0601161415x1be8923bp@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_70064_19444300.1137455463384" References: <34608c0c0601160859g4e077ad9g@mail.gmail.com> <20060116170515.GK22228@surnet.cl> <34608c0c0601161333y54d6a285l@mail.gmail.com> <20060116213746.GF32100@surnet.cl> <34608c0c0601161415x1be8923bp@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.169 required=5 tests=[AWL=0.168, HTML_MESSAGE=0.001] X-Spam-Score: 0.169 X-Spam-Level: X-Archive-Number: 200601/99 X-Sequence-Number: 23888 ------=_Part_70064_19444300.1137455463384 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, Oh, I got it. Now in 8.0.6 When the view has UNION ALL, then PostgreSQL reports this: SELECT FOR UPDAT= E is not allowed in subqueries . I see why: select * from for update; After extraction: select * from UNION ALL for update; In this case it seems as if "for update" is in subquery2. How can this be tricked? Thanks, Otto 2006/1/16, Ott=F3 Havasv=F6lgyi : > > Hello, > > Sorry, I have just tried it, and works with 8.0.5. I had missed something > then. :( > I like PostgreSQL. :) > > Thanks, > Otto > > > 2006/1/16, Alvaro Herrera : > > > > Ott=F3 Havasv=F6lgyi wrote: > > > Hello, > > > > > > Huh, it was weeks ago, and I thought it was normal. It was a simple > > view > > > with one or two inner joins and without aggragates. Perhaps somebody > > could > > > try it. I got an error message, that said I cannot do that. I cannot > > > remember the exact message unfortunately. > > > > Sure, I can try it. Show us the definition and tell us what version ar= e > > > > you using. > > > > -- > > Alvaro Herrera > > http://www.PlanetPostgreSQL.org > > "People get annoyed when you try to debug them." (Larry Wall) > > > > ------=_Part_70064_19444300.1137455463384 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hello,
 
Oh, I got it. Now in 8.0.6
 
When the view has UNION ALL, then PostgreSQL reports this: SELECT FOR = UPDATE is not allowed in subqueries .
 
I see why:
 
select * from <view> for update;
 
After extraction:
 
select * from <subquery1> UNION ALL <subquery2> for update= ;
 
In this case it seems as if "for update" is in subquery= 2.
 
How can this be tricked?
 
Thanks,
Otto

 
2006/1/16, Ott=F3 Havasv=F6lgyi <havasvolgyi.otto@gmail.com>:=
Hello,
 
Sorry, I have just tried it, and works with 8.0.5. I had missed someth= ing then. :( 
I like PostgreSQL. :)
 
Thanks,
Otto

 


------=_Part_70064_19444300.1137455463384--