Re: [GENERAL] currval and DISCARD ALL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, Nigel Heron <nigel(at)psycode(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] currval and DISCARD ALL
Date: 2013-04-16 21:09:19
Message-ID: 8945.1366146559@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> I think his point is why don't we clear currval() on DISCARD ALL? I
> can't think of a good reason we don't.

Because we'd have to invent a new suboperation DISCARD SEQUENCES,
for one thing, in order to be consistent. I'd rather ask why it's
important that we should throw away such state. It doesn't seem to
me to be important enough to justify a new subcommand.

Or, if you'd rather a more direct answer: wanting this sounds like
evidence of bad application design. Why is your app dependent on
getting failures from currval, and isn't there a better way to do it?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2013-04-16 21:30:29 Re: [GENERAL] currval and DISCARD ALL
Previous Message Tom Lane 2013-04-16 21:04:19 Re: Mysterious table that exists but doesn't exist

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-16 21:20:18 Re: Enabling Checksums
Previous Message Ants Aasma 2013-04-16 20:59:12 Re: Enabling Checksums