Get id of a tuple using exception - Mailing list pgsql-sql

From f vf
Subject Get id of a tuple using exception
Date
Msg-id BANLkTik0fUKBcdYEnFeLczA0e6Gmt-3D=g@mail.gmail.com
Whole thread Raw
Responses Re: Get id of a tuple using exception
List pgsql-sql
Hello,<br />i'm using a pl/sql procedure and I prevent inserting duplicate tuples using an exception for example:<br
/><br/>  BEGIN<br />       INSERT INTO "Triples"(id, subject, predicate, "object") <br />                    VALUES
(id,sub_i, pred_i, obj_i);<br /><b> EXCEPTION WHEN unique_violation THEN<br />                --do something.<br /><br
/></b>Insome cases I have interest in getting the id of the tuple that was already in the table when the exception is
triggered.Is there a way for the EXCEPTION to return that id instead of using a select to know wich was the id of the
triplealready existing in the table?<br /><br />Thanks, <br />Filipe<br /> 

pgsql-sql by date:

Previous
From: "Volkmar Herbst GCI"
Date:
Subject: strange update behavior
Next
From: Adrian Klaver
Date:
Subject: Re: Get id of a tuple using exception