pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Taral <taral@mail.utexas.edu>
To: doka@root.webest.com
To: PgSQL-sql <pgsql-sql@postgreSQL.org>
Cc: pgsql-hackers@postgreSQL.org
Subject: RE: [SQL] Is this BUG or FEATURE?
Date: Sat, 17 Oct 1998 12:44:33 -0500
Message-ID: <000001bdf9f5$cccafa00$3b291f0a@taral> (raw)
In-Reply-To: <Pine.LNX.4.03.9810171603380.29982-100000@barnet.kharkov.ua>

> create table AAA (anum int2, aname char(16), ata int4 default 0);
> insert into AAA values (0, '0');
> insert into AAA values (1, '1');
> -- Note: ata hasn't initialized!

Yes it has. ata = 0 in both because you set a default.

> test=> select * from aaa, bbb where bnum = ata;
> NOTICE:  ExecInitMergeJoin: left and right sortop's are unequal!
> anum|           aname|ata|bnum|           bname
> ----+----------------+---+----+----------------
>    0|0               |  0|   0|0
>    1|1               |  0|   0|0
> (2 rows)

You asked for all cases where bnum = ata. I assume select * from aaa,bbb;
would have returned:

anum|           aname|ata|bnum|           bname
----+----------------+---+----+----------------
   0|0               |  0|   0|0
   0|0               |  0|   1|1
   1|1               |  0|   0|0
   1|1               |  0|   1|1

Now filter for bnum=ata and you get two rows.

Am I wrong here?

Taral




view thread (3+ messages)  latest in thread

Message-ID: <000001bdf9f5$cccafa00$3b291f0a@taral>
Permalink:  ../000001bdf9f5$cccafa00$3b291f0a@taral/
Also on:    postgresql.org/message-id/000001bdf9f5$cccafa00$3b291f0a@taral

 · 

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 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: taral@mail.utexas.edu, doka@root.webest.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [SQL] Is this BUG or FEATURE?
  In-Reply-To: <000001bdf9f5$cccafa00$3b291f0a@taral>
  References: <Pine.LNX.4.03.9810171603380.29982-100000@barnet.kharkov.ua> <000001bdf9f5$cccafa00$3b291f0a@taral>

* 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