Re: Bizarre reindex_relation API

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Bizarre reindex_relation API
Date: 2011-04-16 17:05:09
Message-ID: 20110416170509.GB25433@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 16, 2011 at 11:52:47AM -0400, Tom Lane wrote:
> Why in the world is reindex_relation defined like this?
>
> #define REINDEX_CHECK_CONSTRAINTS 0x1
> #define REINDEX_SUPPRESS_INDEX_USE 0x2
> extern bool reindex_relation(Oid relid, bool toast_too, int flags);
>
> Seems like a rational design would have folded toast_too in as another
> flag bit, instead of keeping it a separate argument.

`relid' and `toast_to' constitute the direct object, and `flags' are adverbs.
(Not sure if just made that up or actually rationalized it that way at the
time.) No objection to changing it.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-04-16 17:24:27 Re: MMAP Buffers
Previous Message Tom Lane 2011-04-16 17:04:40 Re: Broken HOT chains in system catalogs