Re: survey: psql syntax errors abort my transactions

Поиск
Список
Период
Сортировка
От Ron
Тема Re: survey: psql syntax errors abort my transactions
Дата
Msg-id b94cb1d2-8b53-edb9-18ec-991e5d5391c0@gmail.com
обсуждение исходный текст
Ответ на Re: survey: psql syntax errors abort my transactions  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: survey: psql syntax errors abort my transactions  (Julien Rouhaud <rjuju123@gmail.com>)
Re: survey: psql syntax errors abort my transactions  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
On 7/3/20 1:54 AM, Laurenz Albe wrote:
> On Thu, 2020-07-02 at 08:54 -0700, Jeremy Schneider wrote:
>> Maybe it's just me, but I'm wondering if it's worth changing the default behavior
>> of psql so it doesn't abort transactions in interactive mode when I mistakenly
>> mis-spell "select" or something silly like that.
>> This is of course easily remedied in my psqlrc file by adding "\set ON_ERROR_ROLLBACK interactive".
>> [...]
>> But I do know that for all the new people coming to PostgreSQL right now
>> (including lots at my company), none of them are going to know about this setting
>> and personally I think the default is user-unfriendly.
>> [...]
>>
>> So...
>>
>> Survey for the user community here on the pgsql-general list: it would be great if lots
>> of people could chime in by answering two questions about your very own production environment:
>>
>> question 1) are you worried about scripts in your production environment where damage
>> could be caused by a different default in a future new major version of postgresql?
>> not aborting transactions in interactive mode when syntax errors occur)
> I would dislike if interactive mode behaves differently from a non-interactive mode.
>
> This is my favorite example why I like the way PostgreSQL does things:
>
> /* poor man's VACUUM (FULL) */
> BEGIN;
> CREATTE TABLE t2 AS SELECT * FROM t1;
> DROP TABLE t1;
> ALTER TABLE t2 RENAME TO t1;
> COMMIT;

How so, since it does not carry over indexes, foreign keys, triggers, 
partition references, etc?

-- 
Angular momentum makes the world go 'round.



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Unable to run psql on 9.5 after broken 12 remove
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: survey: psql syntax errors abort my transactions