diff options
author | Hiroshi Inoue | 1999-11-04 08:01:09 +0000 |
---|---|---|
committer | Hiroshi Inoue | 1999-11-04 08:01:09 +0000 |
commit | 2e2189a568e551e97180a8575bdbe320b3947b34 (patch) | |
tree | 0932a058fad004c0d5b699e15d0d1f66a01be52f /src/include | |
parent | a2c834f709e6841a1eef360f40448167b6f58208 (diff) |
Make it possible to execute crashed CREATE/DROP commands again.
Now indexes of pg_class and pg_type are unique indexes
and guarantee the uniqueness of correponding attributes.
heap_create() was changed to take another boolean parameter
which allows to postpone the creation of disk file.
The name of rd_nonameunlinked was changed to rd_unlinked.
It is used generally(not only for noname relations) now.
Requires initdb.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
-rw-r--r-- | src/include/catalog/heap.h | 5 | ||||
-rw-r--r-- | src/include/catalog/indexing.h | 10 | ||||
-rw-r--r-- | src/include/postgres.h | 3 | ||||
-rw-r--r-- | src/include/utils/rel.h | 4 |
5 files changed, 14 insertions, 12 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 61756629082..7ac22873d1e 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -36,7 +36,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: catversion.h,v 1.1 1999/10/24 20:42:26 tgl Exp $ + * $Id: catversion.h,v 1.2 1999/11/04 08:01:06 inoue Exp $ * *------------------------------------------------------------------------- */ @@ -51,6 +51,6 @@ * catalog changes on the same day...) */ -#define CATALOG_VERSION_NO 199910241 +#define CATALOG_VERSION_NO 199911041 #endif diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index 1cb86b501c7..9d311038cbd 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: heap.h,v 1.24 1999/10/26 03:12:37 momjian Exp $ + * $Id: heap.h,v 1.25 1999/11/04 08:01:04 inoue Exp $ * *------------------------------------------------------------------------- */ @@ -23,7 +23,8 @@ typedef struct RawColumnDefault extern Oid RelnameFindRelid(char *relname); extern Relation heap_create(char *relname, TupleDesc att, - bool isnoname, bool istemp); + bool isnoname, bool istemp, bool storage_create); +extern bool heap_storage_create(Relation rel); extern Oid heap_create_with_catalog(char *relname, TupleDesc tupdesc, char relkind, bool istemp); diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index e39ce1c62d2..5d3d34e876f 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: indexing.h,v 1.27 1999/11/01 04:00:57 momjian Exp $ + * $Id: indexing.h,v 1.28 1999/11/04 08:01:06 inoue Exp $ * *------------------------------------------------------------------------- */ @@ -119,11 +119,11 @@ DECLARE_INDEX(pg_index_indexrelid_index on pg_index using btree(indexrelid oid_o DECLARE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops)); DECLARE_INDEX(pg_proc_proname_narg_type_index on pg_proc using btree(proname name_ops, pronargs int2_ops, proargtypes oid8_ops)); -DECLARE_INDEX(pg_type_oid_index on pg_type using btree(oid oid_ops)); -DECLARE_INDEX(pg_type_typname_index on pg_type using btree(typname name_ops)); +DECLARE_UNIQUE_INDEX(pg_type_oid_index on pg_type using btree(oid oid_ops)); +DECLARE_UNIQUE_INDEX(pg_type_typname_index on pg_type using btree(typname name_ops)); -DECLARE_INDEX(pg_class_oid_index on pg_class using btree(oid oid_ops)); -DECLARE_INDEX(pg_class_relname_index on pg_class using btree(relname name_ops)); +DECLARE_UNIQUE_INDEX(pg_class_oid_index on pg_class using btree(oid oid_ops)); +DECLARE_UNIQUE_INDEX(pg_class_relname_index on pg_class using btree(relname name_ops)); DECLARE_INDEX(pg_attrdef_adrelid_index on pg_attrdef using btree(adrelid oid_ops)); diff --git a/src/include/postgres.h b/src/include/postgres.h index ddc84007332..0beb504d388 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -6,7 +6,7 @@ * * Copyright (c) 1995, Regents of the University of California * - * $Id: postgres.h,v 1.28 1999/10/25 03:07:55 tgl Exp $ + * $Id: postgres.h,v 1.29 1999/11/04 08:01:07 inoue Exp $ * *------------------------------------------------------------------------- */ @@ -138,6 +138,7 @@ typedef uint32 CommandId; #define DATA(x) extern int errno #define DESCR(x) extern int errno #define DECLARE_INDEX(x) extern int errno +#define DECLARE_UNIQUE_INDEX(x) extern int errno #define BUILD_INDICES #define BOOTSTRAP diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 308f9a6d645..28ea74c5e2b 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rel.h,v 1.27 1999/09/29 16:06:28 wieck Exp $ + * $Id: rel.h,v 1.28 1999/11/04 08:01:09 inoue Exp $ * *------------------------------------------------------------------------- */ @@ -78,7 +78,7 @@ typedef struct RelationData bool rd_myxactonly; /* rel uses the local buffer mgr */ bool rd_isnailed; /* rel is nailed in cache */ bool rd_isnoname; /* rel has no name */ - bool rd_nonameunlinked; /* noname rel already unlinked */ + bool rd_unlinked; /* rel already unlinked or not created yet */ Form_pg_am rd_am; /* AM tuple */ Form_pg_class rd_rel; /* RELATION tuple */ Oid rd_id; /* relation's object id */ |