Re: RE: ALTER TABLE...ADD CONSTRAINT?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Pgsql-Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RE: ALTER TABLE...ADD CONSTRAINT?
Date: 2000-11-23 03:44:05
Message-ID: 20393.974951045@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> can someone point me to the C file that handles CREATE
> TABLE so I can see how it's done?

backend/parser/analyze.c has the preprocessing (see
transformCreateStmt). Actual execution starts in
backend/commands/creatinh.c, and there's also important code in
backend/catalog/heap.c.

Plus subroutines scattered here, there, and everywhere :-(.

You really won't get far in reading the PG sources until you have
a tool that will quickly find the definition (and optionally all uses)
of any particular symbol you are interested in. I'm partial to glimpse,
but you could also use ctags/etags or some other indexing program.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Arnold.Zhu 2000-11-23 03:59:58 How to make @id or $id as parameter name in plpgsql, is it available?
Previous Message Philip Warner 2000-11-23 03:12:38 ALTER TABLE...ADD CONSTRAINT?