Re: Remove redundant variable from transformCreateStmt

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amul Sul <sulamul(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove redundant variable from transformCreateStmt
Date: 2021-05-06 21:32:01
Message-ID: 20210506213201.GA14138@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-05-06 22:19:44 Re: alter table set TABLE ACCESS METHOD
Previous Message Alvaro Herrera 2021-05-06 21:19:29 Re: Docs for lock level of ALTER TABLE .. VALIDATE