pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ottó Havasvölgyi <havasvolgyi.otto@gmail.com>
To: Ottó Havasvölgyi <havasvolgyi.otto@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: For update
Date: Tue, 17 Jan 2006 00:51:03 +0100
Message-ID: <34608c0c0601161551q3207bf82p@mail.gmail.com> (raw)
In-Reply-To: <34608c0c0601161415x1be8923bp@mail.gmail.com>
References: <34608c0c0601160859g4e077ad9g@mail.gmail.com>
	<20060116170515.GK22228@surnet.cl>
	<34608c0c0601161333y54d6a285l@mail.gmail.com>
	<20060116213746.GF32100@surnet.cl>
	<34608c0c0601161415x1be8923bp@mail.gmail.com>

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.otto@gmail.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@alvh.no-ip.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)
> >
>
>

view thread (7+ messages)

Message-ID: <34608c0c0601161551q3207bf82p@mail.gmail.com>
Permalink:  ../34608c0c0601161551q3207bf82p@mail.gmail.com/
Also on:    postgresql.org/message-id/34608c0c0601161551q3207bf82p@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: havasvolgyi.otto@gmail.com
  Subject: Re: For update
  In-Reply-To: <34608c0c0601161551q3207bf82p@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox