From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to evaluate if a query is correct? |
Date: | 2013-09-19 15:07:08 |
Message-ID: | 1379603228534-5771624.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2013-09-19 15:26:17 | Re: reading cvs logs with pgadmin queries |
Previous Message | Pavel Stehule | 2013-09-19 15:05:31 | Re: How to evaluate if a query is correct? |