Re: About adding a column to an existing system catalog

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tanmay Deshpande <tp(dot)deshpande07(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: About adding a column to an existing system catalog
Date: 2014-03-25 03:00:00
Message-ID: 29716.1395716400@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tanmay Deshpande <tp(dot)deshpande07(at)gmail(dot)com> writes:
> while adding a column to an existing system catalog I am getting following
> error while initdb

> FATAL: incorrect number of columns in row (expected 22, got 21)

> where do I have to make the changes ?

I'd say you missed updating relnatts in the hard-coded row for
pg_attribute in pg_class.h.

The more general answer is to look through our git history for a previous
commit that did something like what you want, and then read through it to
see if you missed anything.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-03-25 03:32:17 Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
Previous Message Michael Paquier 2014-03-25 02:36:25 Re: Dynamic background workers & docs question