Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Hale Boyes <kcboyes(at)gmail(dot)com>, Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command.
Date: 2013-10-06 07:51:53
Message-ID: CAB7nPqRaBwM-a=O65K3bCf7MnGxtFKwrcxgKPHgX0Sk5HTJKPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sun, Oct 6, 2013 at 1:25 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> Michael Paquier escribió:
>
>> =# discard sequences ;
>> DISCARD SEQUENCES
>> =# select currval('foo');
>> ERROR: 55000: currval of sequence "foo" is not yet defined in this session
>> LOCATION: currval_oid, sequence.c:780
>> =# select lastval();
>> The connection to the server was lost. Attempting reset: Failed.
>
> I wonder if it would be better to have this "seqtab" thing be a dlist,
> and move the most recently used item to head position on nextval().
> That way we don't have to maintain last_used_seq separately.
Indeed, this could simplify a bit the code.
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2013-10-06 13:58:16 pgsql: pgbench: Comment on thread timing hazards.
Previous Message Alvaro Herrera 2013-10-06 04:25:06 Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command.

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2013-10-06 14:10:31 Re: pgbench - exclude pthread_create() from connection start timing
Previous Message Fabien COELHO 2013-10-06 07:48:04 Re: pgbench - exclude pthread_create() from connection start timing