Hi,
On 2018-05-17 08:41:53 +0200, Feike Steenbergen wrote:
> On 16 May 2018 at 16:20, Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com> wrote:
>
> > In this case, they are putting the erroneous call into a column default,
> > so the difference ends up being getting the error at setup time versus
> > at run time, which is a difference of significance.
>
> Yes, I'm not particularly concerned with nextval taking a regclass as
> an argument, and
> therefore raising this error, but I'd rather have this error at DDL
> time than at DML time.
>
> I don't know how hard it would be to implement, but say, calling
> currval(regclass) when
> a default is defined should already throw this error at DDL time.
>
> Or, when registering the default in the catalog, we verify that it is
> actually a sequence:
These alternatives seem like they're not an improvement. I don't think
it's worth doing anything here.
Greetings,
Andres Freund