Search Postgresql Archives

Re: How to evaluate if a query is correct?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux