Re: Feature discussion: Should syntax errors abort a transaction? - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Feature discussion: Should syntax errors abort a transaction?
Date
Msg-id 20120619135627.GA34283@crankycanuck.ca
Whole thread Raw
In response to Re: Feature discussion: Should syntax errors abort a transaction?  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
List pgsql-general
On Tue, Jun 19, 2012 at 03:35:19PM +0200, Rafal Pietrak wrote:
>
> The point is, that SQL syntax errors are so obviusly different from
> execution errors, that noting this distinction should not raise any
> ambiguity.

Good.  One looks forward to your fully-worked-out AI/ESP patch that gets
this right every time.  While you're at it, I suggest fixing these
"obvious" mistakes:

    SELECT SELECT 'text';
    SELECT 'text;
    SELECT INSERT 'text' INTO column;
    INSERT 'text' INTO 'column';

And so on.  Every one of these is a boiled down example of a stupid
think-o I have made more than once.  This is what the command buffer
is for.

If you really want your input system to provide fairly complete syntax
checking for you, however, I will point out that psql's \e command
will happily drop you into the editor of your choice.  If you want an
editor that knows more about what you want than you do, I think you
will find it is spelled "emacs".

Best,

A

--
Andrew Sullivan
ajs@crankycanuck.ca

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Error message "psql: could not connect to server: No such file or directory"
Next
From: Tom Lane
Date:
Subject: Re: Feature discussion: Should syntax errors abort a transaction?