On 2018-May-17, Andres Freund wrote:
> These alternatives seem like they're not an improvement. I don't think
> it's worth doing anything here.
I agree.
If our nextval was less opaque, it'd be worth doing better. I mean
something like
CREATE TABLE tt (
col integer DEFAULT someseq.nextval
...
)
which I think has been proposed over the years (and ultimately rejected;
and even if implemented[1], this would not prevent our current syntax
from being accepted). But we've stuck with the function-call syntax for
better or worse. Let's live with it.
[1] That syntax currently gets this funny error:
alvherre=# create table ff (a int default seq.nextval);
ERROR: missing FROM-clause entry for table "seq"
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services