postgresql/src/backend
Tom Lane 88452d5ba6 Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX.
This feature allows a unique or pkey constraint to be created using an
already-existing unique index.  While the constraint isn't very
functionally different from the bare index, it's nice to be able to do that
for documentation purposes.  The main advantage over just issuing a plain
ALTER TABLE ADD UNIQUE/PRIMARY KEY is that the index can be created with
CREATE INDEX CONCURRENTLY, so that there is not a long interval where the
table is locked against updates.

On the way, refactor some of the code in DefineIndex() and index_create()
so that we don't have to pass through those functions in order to create
the index constraint's catalog entries.  Also, in parse_utilcmd.c, pass
around the ParseState pointer in struct CreateStmtContext to save on
notation, and add error location pointers to some error reports that didn't
have one before.

Gurjeet Singh, reviewed by Steve Singer and Tom Lane
2011-01-25 15:43:05 -05:00
..
access Allow the wal_buffers setting to be auto-tuned to a reasonable value. 2011-01-22 20:31:24 -05:00
bootstrap Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
catalog Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX. 2011-01-25 15:43:05 -05:00
commands Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX. 2011-01-25 15:43:05 -05:00
executor Fix PlanRowMark/ExecRowMark structures to handle inheritance correctly. 2011-01-12 20:47:02 -05:00
foreign Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
lib Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
libpq Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
main Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
nodes Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX. 2011-01-25 15:43:05 -05:00
optimizer Revert incorrect memory-conservation hack in inheritance_planner(). 2011-01-13 14:33:19 -05:00
parser Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX. 2011-01-25 15:43:05 -05:00
po Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
port Code review for postmaster.pid contents changes. 2011-01-13 19:01:28 -05:00
postmaster Avoid treating WAL senders as normal backends. 2011-01-21 22:23:01 -05:00
regex Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
replication Typo fix for MemSet size. 2011-01-25 10:50:04 +01:00
rewrite Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
snowball Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
storage Fix thinko in comment. Spotted by Jim Nasby. 2011-01-18 10:46:13 +02:00
tcop Add views and functions to monitor hot standby query conflicts 2011-01-03 12:46:03 +01:00
tsearch Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
utils Code cleanup for assign_transaction_read_only. 2011-01-22 20:55:50 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
common.mk Workaround for recursive make breakage 2011-01-13 09:32:06 +02:00
nls.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00