Re: Surprising behaviour of \set AUTOCOMMIT ON
От | Daniel Verite |
---|---|
Тема | Re: Surprising behaviour of \set AUTOCOMMIT ON |
Дата | |
Msg-id | 6ff3bee7-183f-4448-9cd3-881c66c63826@mm обсуждение исходный текст |
Ответ на | Re: Surprising behaviour of \set AUTOCOMMIT ON (Rushabh Lathia <rushabh.lathia@gmail.com>) |
Ответы |
Re: Surprising behaviour of \set AUTOCOMMIT ON
Re: Surprising behaviour of \set AUTOCOMMIT ON |
Список | pgsql-hackers |
Rushabh Lathia wrote: > It might happen that SetVariable() can be called from other places in > future, > so its good to have all the set variable related checks inside > SetVariable(). There's already another way to skip the \set check: select 'on' as "AUTOCOMMIT" \gset But there's a function in startup.c which might be the ideal location for the check, as it looks like the one and only place where the autocommit flag actually changes: static void autocommit_hook(const char *newval) { pset.autocommit = ParseVariableBool(newval, "AUTOCOMMIT"); } Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления: