Re: Selecting newly added column returns empty but only when selecting with other columns in table

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Selecting newly added column returns empty but only when selecting with other columns in table
Date: 2015-11-27 03:22:14
Message-ID: 5657CC66.4020704@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/26/2015 7:08 PM, mrtruji wrote:
> Ok this is strange. Shouldn't it always be one or the other? Total row
> count for the table is 279,096.
>
> doggies=# select count(*) from data where features_bin is null;
> count
> --------
> 279096
> (1 row)
>
> doggies=# select count(*) from data where features_bin is not null;
> count
> --------
> 279096
> (1 row)

you inserted 278096 additional rows with (NULL, NULL, <somevalues>) to
the 279096 existing rows that had (value,value,NULL)

--
john r pierce, recycling bits in santa cruz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-11-27 03:24:55 Re: Selecting newly added column returns empty but only when selecting with other columns in table
Previous Message mrtruji 2015-11-27 03:11:50 Re: Selecting newly added column returns empty but only when selecting with other columns in table