From: Philip Warner <pjw@rhyme.com.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Paul McGarry <paulm@opentec.com.au>
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Re: [SQL] MAX() of 0 records.
Date: Mon, 10 Jul 2000 11:43:40 +1000
Message-ID: <3.0.5.32.20000710114340.023b56d0@mail.rhyme.com.au> (raw)
In-Reply-To: <13643.963192071@sss.pgh.pa.us>
References: <3.0.5.32.20000710102430.009bf510@mail.rhyme.com.au>
<9124.962953563@sss.pgh.pa.us>
<396535EF.8132CF80@opentec.com.au>
<8477.962940582@sss.pgh.pa.us>
<39656BD5.801BDEDC@opentec.com.au>
<9124.962953563@sss.pgh.pa.us>
<3.0.5.32.20000710102430.009bf510@mail.rhyme.com.au>
At 21:21 9/07/00 -0400, Tom Lane wrote:
>
>> Sounds perfect to me...
>
>Note that it would not meet your expectation that
This seems OK; the 'update...from' syntax does also seemingly implies that
the rows affected will only be those rows that match the predicate, so your
interpretation is probably more in keeping with intuitive expectation.
>
>... at least not without some kind of outer-join support too. With
>an inner join, t1 tuples not matching any t2 tuple wouldn't be modified
>at all.
This sounds good, but even when OJ come along, I can't see how I would get
the same behaviour as:
update t1 set f2=(Select Count(*) from t2 where t2.f1=t1.f1)
where t1.f1 = 2
since in an OJ, count(*) will, I think, always be at least 1.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: pjw@rhyme.com.au, tgl@sss.pgh.pa.us, paulm@opentec.com.au, pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Re: [SQL] MAX() of 0 records.
In-Reply-To: <3.0.5.32.20000710114340.023b56d0@mail.rhyme.com.au>
References: <3.0.5.32.20000710102430.009bf510@mail.rhyme.com.au> <9124.962953563@sss.pgh.pa.us> <396535EF.8132CF80@opentec.com.au> <8477.962940582@sss.pgh.pa.us> <39656BD5.801BDEDC@opentec.com.au> <3.0.5.32.20000710114340.023b56d0@mail.rhyme.com.au>
* 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