Re: Remove redundant variable from transformCreateStmt

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Remove redundant variable from transformCreateStmt
Дата
Msg-id 20210506213201.GA14138@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Remove redundant variable from transformCreateStmt  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
On 2021-Apr-29, Justin Pryzby wrote:

> Getting rid of a redundant, boolean variable is good not because it's more
> efficient but because it's one fewer LOC to read and maintain (and an
> opportunity for inconsistency, I suppose).

Makes sense. Pushed.  Thanks everyone.

> Also, this is a roundabout and too-verbose way to invert a boolean:
> | transformCheckConstraints(&cxt, !is_foreign_table ? true : false);

It is, yeah.

> PS. It's also not pythonic ;)

Umm.  If you say so.  But this is not Python ...

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Docs for lock level of ALTER TABLE .. VALIDATE
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: alter table set TABLE ACCESS METHOD