Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zwwif-0003J5-D2 for pgsql-sql@arkaria.postgresql.org; Thu, 12 Nov 2015 18:35:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zwwie-0006V5-Vf for pgsql-sql@arkaria.postgresql.org; Thu, 12 Nov 2015 18:35:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZwmQO-0000t2-37 for pgsql-sql@postgresql.org; Thu, 12 Nov 2015 07:36:04 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZwmQF-0002qu-TM for pgsql-sql@postgresql.org; Thu, 12 Nov 2015 07:36:03 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id 664B119E00F2 for ; Wed, 11 Nov 2015 23:24:18 -0800 (PST) Date: Thu, 12 Nov 2015 00:35:54 -0700 (MST) From: ranjitsaurav To: pgsql-sql@postgresql.org Message-ID: <1447313754606-5873613.post@n5.nabble.com> Subject: Exception Handling in Postgis function MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hi I am new in the postgressql. I am trying to using the exception handling for the postgis function. The query is as follows. "SELECT topology.AddEdge('road_topology', ST_GeomFromText(l.linestring, 4326)) As edgeid from (SELECT ST_AsText(geom) as linestring FROM public.clip_linestring) as l;" This query is showing error as follows ERROR: Edge intersects (not on endpoints) with existing edge 162 at or near point POINT(100.3812061 13.6915724) I would like to implement exception handling so that I could know from which line of table "clip_linestring" this error is coming. How do I use the exception handling for these kind of issue. Thank you. Regards, Saurav Ranjit -- View this message in context: http://postgresql.nabble.com/Exception-Handling-in-Postgis-function-tp5873613.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql