title: an empty row with null-like values in not-null field
body: <p>I'm using postgresql 9.0 beta 4. </p>
  
  <p>After inserting a lot of data into a partitioned table, i found a weird thing. When I query the table, i can see an empty row with null-like values in 'not-null' fields.</p>
  
  <p>That weird query result is like below.</p>
  
  <p><img src="https://i.stack.imgur.com/C2z2Y.png" alt="alt text"></p>
  
  <p>689th row is empty. The first 3 fields, (stid, d, ticker), are composing primary key. So they should not be null. The query i used is this.</p>
  
  <pre><code>select * from st_daily2 where stid=267408 order by d
  </code></pre>
  
  <p>I can even do the group by on this data.</p>
  
  <pre><code>select stid, date_trunc('month', d) ym, count(*) from st_daily2 
  where stid=267408 group by stid, date_trunc('month', d)
  </code></pre>
  
  <p>The 'group by' results still has the empty row.</p>
  
  <p><img src="https://i.stack.imgur.com/N8M2Y.png" alt="alt text"></p>
  
  <p>The 1st row is empty.
  But if i query where 'stid' or 'd' is null, then it returns nothing.</p>
  
  <p>Is this a bug of postgresql 9b4? Or some data corruption?</p>
  
  <p><strong>EDIT :</strong></p>
  
  <ol>
  <li><p>I added my table definition.</p>
  
  <pre><code>CREATE TABLE st_daily
  (
  stid integer NOT NULL,
  d date NOT NULL,
  ticker character varying(15) NOT NULL,
  mp integer NOT NULL,
  settlep double precision NOT NULL,
  prft integer NOT NULL,
  atr20 double precision NOT NULL,
  upd timestamp with time zone,
  ntrds double precision
  )
  WITH (
  OIDS=FALSE
  );
  
  
  CREATE TABLE st_daily2
  (
  CONSTRAINT st_daily2_pk PRIMARY KEY (stid, d, ticker),
  CONSTRAINT st_daily2_strgs_fk FOREIGN KEY (stid)
      REFERENCES strgs (stid) MATCH SIMPLE
      ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT st_daily2_ck CHECK (stid &gt;= 200000 AND stid &lt; 300000)
  )
  INHERITS (st_daily)
  WITH (
  OIDS=FALSE
  );
  </code></pre></li>
  <li><p>The data in this table is simulation results. Multithreaded multiple simulation engines written in c# insert data into the database using Npgsql.</p></li>
  <li><p>psql also shows the empty row.</p></li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/NDoAD.png" alt="alt text"></p>