Skip site navigation (1) Skip section navigation (2)

proposal: additional error fields

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: proposal: additional error fields
Date: 2012-05-01 12:21:24
Message-ID: CAFj8pRAYeAk_Y0HzZAgPWjp1uL7HpjPNWy7gFEg3U6ptLSYUag@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello

I have to goals for 9.3. First goal is plpgsql_check_function, second
goal is enhancing ErrorData and error management to support new
fields: COLUMN_NAME, CONSTRAINT_NAME, CONSTRAINT_SCHEMA, SCHEMA_NAME,
TABLE_NAME, ROUTINE_NAME, ROUTINE_SCHEMA, TRIGGER_NAME and
TRIGGER_SCHEMA

previous discussion  is in thread
http://postgresql.1045698.n5.nabble.com/patch-for-9-2-enhanced-errors-td4470837.html

COLUMN_NAME - contains missing or inaccessible column name or empty string
CONSTRAINT_NAME - a name of constraint caused error
CONSTRAINT_SCHEMA - a name of schema where constraint is defined -
usually same as table schema in PostgreSQL
SCHEMA_NAME - schema name of table that caused exception
ROUTINE_NAME, ROUTINE_SCHEMA name and schema of function that caused
exception - this doesn't mean function where exception was raised
TABLE_NAME - a name of table that caused exception
TRIGGER_NAME, TRIGGER_SCHEMA - name and schema of trigger that caused exception

attached patch is redesigned previous version - actually it supports
constraints and RI only

second patch will be related to plpgsql enhancing to use these error fields.

Regards

Pavel

Attachment: eelog-2012-05-01.diff
Description: application/octet-stream (24.1 KB)

Responses

pgsql-hackers by date

Next:From: Peter GeogheganDate: 2012-05-01 12:45:11
Subject: Re: proposal: additional error fields
Previous:From: Hannu KrosingDate: 2012-05-01 12:02:40
Subject: JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group