On Sunday, February 9, 2025, Tom Lane <
tgl@sss.pgh.pa.us> wrote:
You could however make a reasonable case that we should not accept
"varchar(200)" in contexts where we're going to ignore the "(200)"
part. That's pretty ancient too, cf this comment in gram.y:
* We can catch over-specified arguments here if we want to,
* but for now better to silently swallow typmod, etc.
* - thomas 2000-03-22
I'm not sure whether rejecting such things would make more people
happy than it made unhappy.
Given that pg_dump already outputs the typmod-less code I’d have to suspect that making specifying a typmod here an error would be better for our reputation, and users, overall.
David J.