From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tanmay Deshpande <tp(dot)deshpande07(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: About adding an attribute to a system catalog |
Date: | 2014-03-31 18:43:38 |
Message-ID: | 21268.1396291418@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Adding attributes to bootstrap tables is a whole lot more fiddly than
> for other system tables. I suggest looking at a patch that did this
> to see what's involved. For example, commit
> 76a47c0e7423891d4b4f0977312f46fec6c5c416 removed and replaced a column
> in pg_attribute, so by looking through there you could see all of the
> places that had to be updated.
One way in which that particular commit isn't a great example is that,
since the number of columns didn't change, it didn't expose the need to
update pg_attribute's handmade row in pg_class.h. Failing to update the
column count in that DATA line is a standard gotcha when adding columns to
one of the BKI_BOOTSTRAP tables.
In general, though, Robert's advice is good: find a previous commit that
did something similar to what you need. And grep is your friend in any
case.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Behn, Edward (EBEHN) | 2014-03-31 18:43:51 | Re: Array of composite types returned from python |
Previous Message | Robert Haas | 2014-03-31 18:21:10 | Re: separate output dirs for test decoding pieces. |