Tom Lane wrote:
> In short, I think there's a reasonably good case to be made for losing the
> hidden dependency and re-adopting the viewpoint that saying SERIAL is
> *exactly* the same as making a sequence and then making a default
> expression that uses the sequence. Nothing behind the curtain.
>
I speak more as a user than a hacker, but I do still lurk here ;)
The way sequences are handled is imho one of the strongest features. The
possiblity to query nextval is bordering on divine.
I have however stopped using serials for anything else than quick mockup
examples. The work of defining the sequence itself and setting acl's is
imho trivial compared to consistency.
I would actually suggest throwing a warning, that sequences are the
proper way of doing it when people use serials - maybe even mark
serial-types as obsolete in the docs.
I strongly subscribe to the principle of least astonishment, and that
means either pure sequences, a mysqlesqe auto_increment or both - but I
fail to see, how the "macro"thing serial will ever work that way. It
goes without saying, that I dislike auto_increment.
Svenne