From: | Edson Richter <edsonrichter(at)hotmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Feature discussion: Should syntax errors abort a transaction? |
Date: | 2012-06-20 14:49:55 |
Message-ID: | BLU0-SMTP38253D2A4092E967BD126D2CFFE0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Em 20/06/2012 11:00, felix(at)crowfix(dot)com escreveu:
> On Wed, Jun 20, 2012 at 06:36:09AM -0700, felix(at)crowfix(dot)com wrote:
>> On Tue, Jun 19, 2012 at 11:25:24AM -0600, Scott Marlowe wrote:
>>> On Tue, Jun 19, 2012 at 8:50 AM, Edson Richter <edsonrichter(at)hotmail(dot)com> wrote:
>>>> There is also the case of dynamically generated sql statements based on user selection... being syntax or not, I would never want half job done. Thia is the purpose of transactions: or all or nothing...
>>> This this this, and again, this. Imagine:
>>>
>>> begin;
>>> insert into tableb selcet * from tableb;
>>> truncate tableb;
>>> commit;
>>>
>>> What should happen when we get to the error on the second line? Keep
>>> going? Boom, data gone because of a syntax error.
>> I've been lurking, and maybe I should go back to that :-) but I think you misunderstand. The idea is not to ignore or second-guess typoes, but to report them without affecting the transaction, and only do this in interactive sessions.
>>
>> Personally, I like the idea of BEGIN INTERACTIVE, but note I do not offer to do the work.
> Looks like I should go back to lurking, and do better at it :-(
>
> The discussion began about differentiatng typoes and other errors, which is clearly not easy or obvious, and something that has always frustrated me when I find programs which try to do so. Then I saw the idea of BEGIN INTERACTIVE and lost sight of the discussion.
>
> My apoligies for stepping in so badly.
>
Don't be sorry, your question arrived a great discussion.
Nobody is mad about that, is just a matter to have great minds having
great discussions!
Thansk for bringing that. Does not mean I agree with your point, but the
debate is bigger than my personal opinion.
I'm certain that something good will arrive from this thread.
In time: I believe that "Begin Interactive" is not a good idea. Such
behavior shall be built in the interface application, not in database
backend... As I stated before, being tolerant or not, or trying to
"guess" what user means is a task for the interface. The database must
keep the "always safe, always good" policy with data.
Regards,
Edson.
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2012-06-20 14:58:31 | Re: RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION |
Previous Message | Emi Lu | 2012-06-20 14:43:08 | Simple method to format a string? |