Re: calling currval() before nextval() patch adding currval_isset()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Hansen <john(at)geeknet(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: calling currval() before nextval() patch adding currval_isset()
Date: 2004-11-07 23:48:08
Message-ID: 24899.1099871288@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

John Hansen <john(at)geeknet(dot)com(dot)au> writes:
> attached, cvs context diff that adds currval_isset('sequence_name');

> This avoids the warning messages you get when calling currval before
> nextval in situations where the program flow does not allow you to
> predetermine if the current session has called nexval yet.

I would argue that a program written that way is broken by definition,
and we should not encourage programmers to write broken applications.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message John Hansen 2004-11-08 00:10:23 Re: calling currval() before nextval() patch adding
Previous Message Rod Taylor 2004-11-07 23:39:31 Re: calling currval() before nextval() patch adding