Re: Remove redundant variable from transformCreateStmt - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Remove redundant variable from transformCreateStmt
Date
Msg-id 20210506213201.GA14138@alvherre.pgsql
Whole thread Raw
In response to Re: Remove redundant variable from transformCreateStmt  (Justin Pryzby <pryzby@telsasoft.com>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Docs for lock level of ALTER TABLE .. VALIDATE
Next
From: Justin Pryzby
Date:
Subject: Re: alter table set TABLE ACCESS METHOD