Lists: | pgsql-performance |
---|
From: | Ralph Mason <ralph(dot)mason(at)telogis(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Figuring out which command failed |
Date: | 2005-11-07 21:30:15 |
Message-ID: | 436FC767.1010702@telogis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-performance |
Hi,
I have a transaction that has multiple separate command in it (nothing
unusual there).
However sometimes one of the sql statements will fail and so the whole
transaction fails.
In some cases I could fix the failing statement if only I knew which one
it was. Can anyone think of any way to get which statement actually
failed from the error message? If the error message gave me the line of
the failure it would be excellent, but it doesn't. Perhaps it would be
easy for me to patch my version of Postgres to do that?
I realize I could do this with 2 phase commit, but that isn't ready yet!
Any thoughts or ideas are much appreciated
Thanks
Ralph
From: | "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com> |
---|---|
To: | Ralph Mason <ralph(dot)mason(at)telogis(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Figuring out which command failed |
Date: | 2005-11-08 23:26:28 |
Message-ID: | 80733A02-C543-4F12-93C3-9DE328522E21@sitening.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-performance |
On Nov 7, 2005, at 3:30 PM, Ralph Mason wrote:
> Hi,
>
> I have a transaction that has multiple separate command in it
> (nothing unusual there).
>
> However sometimes one of the sql statements will fail and so the
> whole transaction fails.
>
> In some cases I could fix the failing statement if only I knew
> which one it was. Can anyone think of any way to get which
> statement actually failed from the error message? If the error
> message gave me the line of the failure it would be excellent, but
> it doesn't. Perhaps it would be easy for me to patch my version of
> Postgres to do that?
>
> I realize I could do this with 2 phase commit, but that isn't ready
> yet!
>
> Any thoughts or ideas are much appreciated
>
> Thanks
> Ralph
2PC might not've been ready yesterday, but it's ready today!
http://www.postgresql.org/docs/whatsnew
--
Thomas F. O'Connell
Database Architecture and Programming
Co-Founder
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)