title: Java.SQL and PostgreSQL table
body: <p>I had a few questions for <code>java.sql.*</code>;</p>
  
  <p>1)  How can I get a list of types for all columns in the table? Now I do request</p>
  
  <pre><code>SELECT data_type FROM information_schema.columns
  WHERE  information_schema.columns.table_name = 'TableName';
  </code></pre>
  
  <p>How to do the same thing using Java? I think with the names of speakers, will be similar.</p>
  
  <p>2)  Yet it is not clear how to define the column attributes: <code>NULL / NOT NULL</code>, <code>PRIMARY KEY</code>, etc.</p>
  
  <p>3)  A separate question about <code>SERIAL</code>: when getting type, this column returns <code>INT</code> and its processing is not possible. Is there a method to distinguish a <code>SERIAL</code> column?</p>
  
  <p>Thank you for your understanding.</p>