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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Memo on coding practices: strcmp() does not yield bool
Дата
Msg-id 8121.962936212@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Memo on coding practices: strcmp() does not yield bool  (JanWieck@t-online.de (Jan Wieck))
Список pgsql-hackers
JanWieck@t-online.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


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 2nd update on TOAST
Следующее
От: Tom Lane
Дата:
Сообщение: fcntl(SETLK) [was Re: 2nd update on TOAST]