lup wrote > On 09/19/2013 12:13 AM, Juan Daniel Santana Rodés wrote: >> Hi my friends... >> I wrote in the last post a question similiar to this. But in this post >> I clarify better the previous question. >> I need know how to evaluated if a query is correct without execute it. >> When I say if a query is correct, is that if I run the query, it did >> not throw an exception. >> For example... > > Is this an academic exercise or are you actually planning on checking > sql then executing it if it's ok (according to your function). I love > plpgsql but I don't think it's the best option for, just to get started, > parsing the incoming sql text - that would be one nasty regexp :) There isn't a need to parse the text; the internal parser will do that for you - you just need to make sure that the executor never gets ahold of the resultant execution plan. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-evaluate-if-a-query-is-correct-tp5771568p5771624.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general