Re: count(*) of zero rows returns 1

From: Shaun Thomas <sthomas(at)optionshouse(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, David Johnston <polobo(at)yahoo(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: count(*) of zero rows returns 1
Date: 2013-01-15 19:26:52
Message-ID: 50F5AD7C.2070601@optionshouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/15/2013 01:18 PM, Bruce Momjian wrote:

>> AFAICR, 'dual' table has one column named 'DUMMY' and one row with
>> value, single character X.
>
> How elegant. :-(

Let's see what EnterpriseDB produces:

test=> select * from dual;

dummy
-------
X
(1 row)

Yep, elegant gets my vote. ;) But then again, Oracle also created
VARCHAR2 and told everyone to start using that, just in case they ever
modified VARCHAR to be SQL compliant. Thankfully we have you guys, so PG
won't go down a similar route.

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas(at)optionshouse(dot)com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-01-15 19:28:56 Re: pg_ctl idempotent option
Previous Message Bruce Momjian 2013-01-15 19:24:09 Re: [PATCH] COPY .. COMPRESSED