回覆: Re: A strange problem

From: Tang Tim Hei <timheit(at)netvigator(dot)com>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: 回覆: Re: A strange problem
Date: 2005-08-28 00:46:56
Message-ID: 20050828004656.JTUZ7605.wmail04dat.netvigator.com@mail.netvigator.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>
> 寄件者: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
> 日期: 2005/08/27 星期六 下午 11:25:49 HKT
> 收件者: Tang Tim Hei <timheit(at)netvigator(dot)com>
> 副本: pgsql-general(at)postgresql(dot)org
> 主旨: Re: [GENERAL] A strange problem
>
> On Sat, 27 Aug 2005, Tang Tim Hei wrote:
>
> > Hi,
>
> > I'm new to postgresql. Anytime I type the following command to the
> > database to run, it give me no result record if table 'country' is
> > empty but can get result if 'country' is not empty. Is this so
> > strange?
>
> Not really. You're doing a cartesian join between test.currency and
> test.country. If there are no rows in test.country, there are no rows in
> the output of the from clause.
>
> > select A.* from test.currency A, test.country B where A.curr_cd='USD'
>
>
>

In the above command, I just add another table reference to it and it gives me two different results.
Even I add columns like B.* to it, it do the same things too. Is it not consistance?
In real world, I don't know the 'country' table is empty or not.
Sometime it is empty and sometime it is not empty, this will confuse me whether my program has bug or not.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2005-08-28 01:03:20 Re: 回覆: Re: A strange problem
Previous Message Chris Travers 2005-08-27 22:40:06 Re: POSS. FEATURE REQ: "Dynamic" Views