title: How to retrieve Postgresql Sequence-cache value from Postgresql Catalog tables?
body: <p>I have used this below query to get the complete information of Sequence objects from the Postgresql catalog table</p>
  
  <pre><code>select s.sequence_name, s.start_value, s.minimum_value, s.maximum_value, s.increment, s.cycle_option 
  from information_schema.sequences s 
   where s.sequence_schema='schema1' 
  </code></pre>
  
  <p>One more attribute value am not able to get is "Cache" value.</p>
  
  <p>Am using Postgresql 9.2</p>
  
  <p>Here is the DDL syntax for the sequence with cache,</p>
  
  <blockquote>
    <p>ALTER SEQUENCE [ IF EXISTS ] name [ INCREMENT [ BY ] increment ]</p>
    
    <p>[ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE
    ]</p>
    
    <p>[ START [ WITH ] start ]</p>
    
    <p>[ RESTART [ [ WITH ] restart ] ]</p>
    
    <p>[ CACHE cache ] [ [ NO ] CYCLE ]</p>
    
    <p>[ OWNED BY { table_name.column_name | NONE } ]</p>
  </blockquote>
  
  <p>Is there any Postgres functions to get this Sequence cache value ?</p>
  
  <p>Thanks,</p>
  
  <p>Ravi</p>