Skip site navigation (1) Skip section navigation (2)

Re: For update

From: Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>
To: Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: For update
Date: 2006-01-16 23:51:03
Message-ID: 34608c0c0601161551q3207bf82p@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
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 subquery2.

How can this be tricked?

Thanks,
Otto


2006/1/16, Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>:
>
> 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 <alvherre(at)alvh(dot)no-ip(dot)org>:
> >
> > Ottó Havasvölgyi 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 are
> >
> > you using.
> >
> > --
> > Alvaro Herrera
> > http://www.PlanetPostgreSQL.org <http://www.planetpostgresql.org/>
> > "People get annoyed when you try to debug them."  (Larry Wall)
> >
>
>

In response to

pgsql-sql by date

Next:From: Daniel CAUNEDate: 2006-01-17 01:55:15
Subject: Re: Executing plpgsql scripts using psql, is that possible?
Previous:From: Ottó HavasvölgyiDate: 2006-01-16 22:15:40
Subject: Re: For update

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group