Re: sequence data type

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Daniel Verite <daniel(at)manitou-mail(dot)org>, Steve Singer <steve(at)ssinger(dot)info>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sequence data type
Date: 2017-01-30 17:34:41
Message-ID: 312f9164-4ca7-01ae-fcf3-ccf8df05c269@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/30/17 12:42 AM, Michael Paquier wrote:
> Sure. Thanks for looking into that and getting a patch out. Oh, I have
> just noticed that sequence_1.out has been removed by 9c18104c. That's
> nice.

> Looking at the patch adding some new tests, the coverage really
> increases (I did not run make coverage to be honest, but that's
> clearly an improvement).
>
> Another test that could be added is about nextval() and setval() that
> only work for temporary sequences in a read-only transaction:
> create sequence foo;
> create temp sequence footemp;
> begin read only;
> select nextval('footemp'); -- ok
> select nextval('foo'); -- error
> rollback;
> begin read only;
> select setval('footemp', 1); -- ok
> select setval('foo', 1); -- error
> rollback
>
> But it is a bit funky I agree.

Looks useful to me. I have committed the tests with your addition.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-01-30 17:35:37 Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Previous Message David Steele 2017-01-30 17:29:04 Re: Checksums by default?