Re: patch for 9.2: enhanced errors
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Josh Berkus <josh@agliodbs.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2011-07-27T21:20:37Z
Lists: pgsql-hackers
Attachments
- enhanced-errors.diff (text/x-patch)
Hello this is a refreshed patch. Only constraints and RI is supported now. There is about 1000 ereport calls, where a enhanced diagnostics should be used, but probably we don't modify all in one time. Regards Pavel Stehule 2011/7/19 Alvaro Herrera <alvherre@commandprompt.com>: > Excerpts from Pavel Stehule's message of lun jul 18 16:02:43 -0400 2011: >> 2011/7/18 Tom Lane <tgl@sss.pgh.pa.us>: > >> > which suggests that it might be meant *only* for use with >> > INSUFFICIENT_PRIVILEGE errors that are thrown due to a column ACL. >> > We can probably extend that to some other syntax errors, like unknown >> > column or wrong datatype or what have you, but there is nothing here to >> > suggest that we have to force the issue for errors that don't naturally >> > relate to exactly one column. And CHECK constraints don't. Consider >> > "CHECK (f1 > f2)". >> >> ok, this is relative clean, but >> >> so for example, NULL or DOMAIN constraints doesn't affect a >> COLUMN_NAME? These constraints has no name. > > I dunno about domains, but NOT NULL constraints definitely have names > according to the standard (and will have them in PG soon enough). > > Hmm, domain constraints are CHECK or NOT NULL, and both of them have or > will have names. > > -- > Álvaro Herrera <alvherre@commandprompt.com> > The PostgreSQL Company - Command Prompt, Inc. > PostgreSQL Replication, Consulting, Custom Development, 24x7 support >