Re: RE: ALTER TABLE...ADD CONSTRAINT? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RE: ALTER TABLE...ADD CONSTRAINT?
Date
Msg-id 20393.974951045@sss.pgh.pa.us
Whole thread Raw
In response to RE: ALTER TABLE...ADD CONSTRAINT?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.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


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: RE: ALTER TABLE...ADD CONSTRAINT?
Next
From: Philip Warner
Date:
Subject: Breaking of existing apps with CVS version