| From: | Shawn Gennaria <sgennaria2(at)gmail(dot)com> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
| Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: How to determine offending column for insert exceptions |
| Date: | 2015-04-21 16:48:48 |
| Message-ID: | CADx9qBnUOV964nhA=s2XZnpsrc=nJWx-rS4QUXjp1aHLKNDbpA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Glad to hear it's here just in time. I am using 9.4, though, so I wish I
could figure out why it's returning NULL when I use it. And the error
message string doesn't contain any column name to parse in my output.
On Tue, Apr 21, 2015 at 12:46 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
> Shawn Gennaria wrote:
> > OK, I'm looking at
> >
> www.postgresql.org/docs/9.4/interactive/plpgsql-control-structures.html#PLPGSQL-EXCEPTION-DIAGNOSTICS-VALUES
> > which I completely missed before. This sounds like my answer, but it's
> not
> > returning anything when I try to extract the COLUMN_NAME.
>
> As far as I recall, COLUMN_NAME is new in 9.4. If you're trying with an
> earlier version, you can't get that info other than by parsing the error
> message string.
>
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2015-04-21 17:04:05 | Re: How to determine offending column for insert exceptions |
| Previous Message | Alvaro Herrera | 2015-04-21 16:46:35 | Re: How to determine offending column for insert exceptions |