Re: PostgreSQL 9.6: view based on sequence

From: Enrico Pirozzi <e(dot)pirozzi(at)nbsgroup(dot)it>
To: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL 9.6: view based on sequence
Date: 2018-01-24 12:02:32
Message-ID: b882e612-ae22-a81d-f2f3-111675289472@nbsgroup.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> tmp1=# create sequence x;
> CREATE SEQUENCE
> Time: 69,857 ms
> tmp1=# select * from x;
> last_value | log_cnt | is_called
> ------------+---------+-----------
> 1 | 0 | f
> (1 row)
>
> Maybe what you want to do is
>
> create view v_test_sequence as select nextval( 'test_sequence' );
>
> Ciao.

Yes but this appens on a 10.x version :)

Ciao
--

Enrico Pirozzi
e(dot)pirozzi(at)nbsgroup(dot)it

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Enrico Pirozzi 2018-01-24 12:05:06 Re: PostgreSQL 9.6: view based on sequence
Previous Message Vincenzo Romano 2018-01-24 11:56:38 Re: PostgreSQL 9.6: view based on sequence