I have a table in my postgres database that looks like this when I describe it.
                                  Table "public.statistical_outputs"
      Column       |           Type           |                            Modifiers                             
-------------------+--------------------------+------------------------------------------------------------------
 id                | bigint                   | not null default nextval('statistical_outputs_id_seq'::regclass)
I want to know what value will be inserted into the id column if I use a statement like
insert into statistical_outputs VALUES (DEFAULT);
I have tried things like
select nextval('id') from statistical_outputs;
but it does not work.
Possibly related questions:
postgresql sequence nextval in schema
PostgreSQL nextval and currval in same query
This questions is a possible duplicate of:
Get the default values of table columns in Postgres?
However, the answer given by Chris is the one I want without having to look at the information schema (which I think I tried but didn't work).
 
     
     
    