title: Netezza: ERROR: 65536 : Record size limit exceeded
body: <p>Can someone please explain below behavior </p>
  
  <pre><code>KAP.ADMIN(ADMIN)=&gt; create table char1 ( a char(64000),b char(1516));
  
  CREATE TABLE
  
  KAP.ADMIN(ADMIN)=&gt; create table char2 ( a char(64000),b char(1517));
  </code></pre>
  
  <blockquote>
    <p>ERROR:  65536 : Record size limit exceeded</p>
  </blockquote>
  
  <pre><code>KAP.ADMIN(ADMIN)=&gt; insert into char1 select * from char1;
  </code></pre>
  
  <blockquote>
    <p>ERROR:  65540 : Record size limit exceeded => why this error during
    insert if create table does not throw any error for same table as
    shown above.</p>
  </blockquote>
  
  <pre><code>KAP.ADMIN(ADMIN)=&gt; \d char1
                        Table "CHAR1"
  
  Attribute |       Type       | Modifier | Default Value
  
  -----------+------------------+----------+---------------
  
  A         | CHARACTER(64000) |          |
  
  B         | CHARACTER(1516)  |          |
  
  Distributed on hash: "A"
  
  ./nz_ddl_table KAP char1
  
  Creating table:  "CHAR1"
  
  CREATE TABLE  CHAR1
  (
       A        character(64000),
       B        character(1516)
  )
  DISTRIBUTE ON (A)
  ;
  
  /*
         Number of columns  2
  
      (Variable) Data Size  4 - 65520
              Row Overhead  28
    ======================  =============
  
    Total Row Size (bytes)  32 - 65548
  
  */
  </code></pre>
  
  <p>I would like to know the calculation of row size in above case.
  I checked the netezza db user guide, but not able to understand its calculation in above example.</p>