Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column
Date
Msg-id 8ea169d1-35d9-e159-eb2f-7026c1e988eb@2ndquadrant.com
Whole thread Raw
In response to Re: BUG #15198: nextval() accepts tables/indexes when adding a default to a column  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column  (Feike Steenbergen <feikesteenbergen@gmail.com>)
List pgsql-bugs
On 5/16/18 10:14, Tom Lane wrote:
> That's about what we'd have to do, and it seems like far more
> infrastructure than the problem is worth.  All you're accomplishing
> is to emit the same error at a different time, and for that you need
> a named, documented data type.

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.  However, that kind
of manual fiddling should be rare, and it's certainly not the only way
to create run time errors from complex default expressions.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15198: nextval() accepts tables/indexes when adding a default to a column
Next
From: Tom Lane
Date:
Subject: Re: Abnormal JSON query performance