Re: [GENERAL] currval and DISCARD ALL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] currval and DISCARD ALL
Date
Msg-id 8945.1366146559@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] currval and DISCARD ALL  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [GENERAL] currval and DISCARD ALL
Re: [GENERAL] currval and DISCARD ALL
List pgsql-hackers
Bruce Momjian <bruce@momjian.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



pgsql-hackers by date:

Previous
From: Ants Aasma
Date:
Subject: Re: Enabling Checksums
Next
From: Tom Lane
Date:
Subject: Re: Enabling Checksums