diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-29 20:56:21 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-29 20:56:21 +0000 |
commit | 25d9bf2e3e66ee2e546c5c523d148ecab6ee1dcc (patch) | |
tree | b0dee0f1d6111fd6658d432ec30e5ddb88adc02f /src/include/catalog/pg_index.h | |
parent | 850490579318ff52097eec92ce535357dd0c7a3a (diff) | |
download | postgresql-25d9bf2e3e66ee2e546c5c523d148ecab6ee1dcc.tar.gz |
Support deferrable uniqueness constraints.
The current implementation fires an AFTER ROW trigger for each tuple that
looks like it might be non-unique according to the index contents at the
time of insertion. This works well as long as there aren't many conflicts,
but won't scale to massive unique-key reassignments. Improving that case
is a TODO item.
Dean Rasheed
Diffstat (limited to 'src/include/catalog/pg_index.h')
-rw-r--r-- | src/include/catalog/pg_index.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index 1ec2e49a59..36ffef5ed8 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_index.h,v 1.47 2009/01/01 17:23:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_index.h,v 1.48 2009/07/29 20:56:20 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -35,6 +35,7 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS int2 indnatts; /* number of columns in index */ bool indisunique; /* is this a unique index? */ bool indisprimary; /* is this index for primary key? */ + bool indimmediate; /* is uniqueness enforced immediately? */ bool indisclustered; /* is this the index last clustered by? */ bool indisvalid; /* is this index valid for use by queries? */ bool indcheckxmin; /* must we wait for xmin to be old? */ @@ -62,21 +63,22 @@ typedef FormData_pg_index *Form_pg_index; * compiler constants for pg_index * ---------------- */ -#define Natts_pg_index 14 +#define Natts_pg_index 15 #define Anum_pg_index_indexrelid 1 #define Anum_pg_index_indrelid 2 #define Anum_pg_index_indnatts 3 #define Anum_pg_index_indisunique 4 #define Anum_pg_index_indisprimary 5 -#define Anum_pg_index_indisclustered 6 -#define Anum_pg_index_indisvalid 7 -#define Anum_pg_index_indcheckxmin 8 -#define Anum_pg_index_indisready 9 -#define Anum_pg_index_indkey 10 -#define Anum_pg_index_indclass 11 -#define Anum_pg_index_indoption 12 -#define Anum_pg_index_indexprs 13 -#define Anum_pg_index_indpred 14 +#define Anum_pg_index_indimmediate 6 +#define Anum_pg_index_indisclustered 7 +#define Anum_pg_index_indisvalid 8 +#define Anum_pg_index_indcheckxmin 9 +#define Anum_pg_index_indisready 10 +#define Anum_pg_index_indkey 11 +#define Anum_pg_index_indclass 12 +#define Anum_pg_index_indoption 13 +#define Anum_pg_index_indexprs 14 +#define Anum_pg_index_indpred 15 /* * Index AMs that support ordered scans must support these two indoption |