Re: Transaction aborts on syntax error.

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Transaction aborts on syntax error.
Дата
Msg-id 200402121455.i1CEtNq16855@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Transaction aborts on syntax error.  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Ответы Re: Transaction aborts on syntax error.  ("Simon Riggs" <simon@2ndquadrant.com>)
Список pgsql-hackers
Zeugswetter Andreas SB SD wrote:
> 
> >> 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.

Stops execution on the first error?  What does that mean?  It means it
stops reading the rest of the command file?  We might be able to do
that (invalidate the entire session), but is that desired?

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

Oh, yea, that would be bad.  So you want to invalidate the entire
session on any error?  That could be done.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: How can I have 2 completely seperated databases in
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: How can I have 2 completely seperated databases in