Re: Memo on coding practices: strcmp() does not yield bool

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Memo on coding practices: strcmp() does not yield bool
Date: 2000-07-07 02:16:52
Message-ID: 8121.962936212@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

JanWieck(at)t-online(dot)de (Jan Wieck) writes:
> Oh boy. Originally I wrote ruleutils.c as a proof that
> rewrite rules "can" tell what the original rule (or view)
> looked like. Someone called it a "magic piece of software"
> and we adopted it as a useful thing to dump views and rules
> (what we wheren't able before). Now you blame me for it's
> uglyness.

Hey, I didn't mean to sound like I was picking on you in particular.
There are a lot of instances of that coding practice in our system.

I just used ruleutils.c as an example because that was where the
reported bug was --- and yes, this was from a regression test porting
failure report; the rules output was missing some AS clauses it
should've had. With this fix, we pass regress tests on MkLinux PPC
at default optimization level. This bug was probably masked before
because we couldn't compile with optimization on that platform,
due to the far worse portability bugs in fmgr.

The way I see it, today we learned one more tidbit about how to produce
portable C code. You didn't know it before, and neither did I. No
shame in that.

The more bugs we fix, the higher our standards become. It's all
part of the process of world domination ;-)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-07 02:46:31 fcntl(SETLK) [was Re: 2nd update on TOAST]
Previous Message Bruce Momjian 2000-07-07 02:04:00 Re: 2nd update on TOAST