Re: [HACKERS] sequence data type - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] sequence data type
Date
Msg-id 312f9164-4ca7-01ae-fcf3-ccf8df05c269@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] sequence data type  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] sequence data type
List 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



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: [HACKERS] Checksums by default?
Next
From: Fabien COELHO
Date:
Subject: Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)