not aborting transactions on failed select - Mailing list pgsql-general

From Sergey Shelukhin
Subject not aborting transactions on failed select
Date
Msg-id CAHXxaiAKTQFujcvbnyOe71j-+PimyH3F38VWiM2y=FevJc4UdQ@mail.gmail.com
Whole thread Raw
Responses Re: not aborting transactions on failed select  (David Johnston <polobo@yahoo.com>)
Re: not aborting transactions on failed select  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Hi.
Is there any way to make postgres not abort the transaction on failed select?

I have a system that uses ORM to retrieve data; ORM is very slow for some cases, so there's a perf optimization that issues ANSI SQL queries directly thru ORM's built-in passthru, and falls back to ORM if they fail.
All of these queries are select-s, and the retrieval can be a part of an external transaction.

It worked great in MySQL, but Postgres being differently ANSI-non-compliant, the queries do fail. Regardless of whether they can be fixed, in such cases the fall-back should work. What happens in Postgres however is that the transaction is aborted; all further SELECTs are ignored.

Is there some way to get around this and not abort the transaction on failed selects?
This behavior seems extremely counter-intuitive.

Thanks.

CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: help getting a backtrace from 9.2 on Ubuntu 13.04?
Next
From: David Johnston
Date:
Subject: Re: not aborting transactions on failed select