Re: Transaction aborts on syntax error. - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: Transaction aborts on syntax error.
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA49620AF@m0114.s-mxs.net
Whole thread Raw
In response to Transaction aborts on syntax error.  (ramirez@idconcepts.org (Edwin S. Ramirez))
Responses Re: Transaction aborts on syntax error.  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
Re: Transaction aborts on syntax error.  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
>> Improving on "not ideal" would be good, and would get even closer to
>> full Oracle/SQLServer migration/compatibility. However, since I've never
>> looked at that section of code, I couldn't comment on any particular
>> approach nor implement such a change, so I'll shut up and be patient.
>
> Imagine this:
>
>     BEGIN WORK;
>     LOCK oldtab;
>     CREATE_X TABLE newtab AS SELECT * FROM oldtab;
>     DELETE oldtab;
>     COMMIT
>
> In this case, you would want the database to abort on a syntax error, right?

Yeah, but in other db's this is solved by the frontend. e.g. in Informix
dbaccess has a mode that simply stops execution upon first error. So I don't
think this is a nogo argument, if we added such a feature to psql.

Imagine your script continuing with "insert into newtab ..." after the commit,
wouldn't you actually want that to not run eighter ?

Andreas


pgsql-hackers by date:

Previous
From: "Thomas Hallgren"
Date:
Subject: Re: Request for additional SPI functions.
Next
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: Transaction aborts on syntax error.