diff options
| author | Bruce Momjian <bruce@momjian.us> | 1998-08-19 02:04:17 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1998-08-19 02:04:17 +0000 |
| commit | 7971539020a344dce3a8b3b9b93ff4f10e2f823a (patch) | |
| tree | 8dca0af0d3ac8d431bff8c0dec793fe9733a1ee9 /src/include/utils | |
| parent | 31de2c9461dff3284ad61084c73eba093fa3f68e (diff) | |
| download | postgresql-7971539020a344dce3a8b3b9b93ff4f10e2f823a.tar.gz | |
heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/builtins.h | 9 | ||||
| -rw-r--r-- | src/include/utils/oidcompos.h | 52 | ||||
| -rw-r--r-- | src/include/utils/rel.h | 6 | ||||
| -rw-r--r-- | src/include/utils/syscache.h | 19 |
4 files changed, 20 insertions, 66 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index e359c526f0..26453ddae4 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.46 1998/07/12 21:29:38 momjian Exp $ + * $Id: builtins.h,v 1.47 1998/08/19 02:04:03 momjian Exp $ * * NOTES * This should normally only be included by fmgr.h. @@ -165,6 +165,7 @@ extern int32 btint42cmp(int32 a, int16 b); extern int32 btfloat4cmp(float32 a, float32 b); extern int32 btfloat8cmp(float64 a, float64 b); extern int32 btoidcmp(Oid a, Oid b); +extern int32 btoid8cmp(Oid a[], Oid b[]); extern int32 btabstimecmp(AbsoluteTime a, AbsoluteTime b); extern int32 btcharcmp(char a, char b); extern int32 btnamecmp(NameData *a, NameData *b); @@ -334,6 +335,10 @@ extern char *oidout(Oid o); extern bool oideq(Oid arg1, Oid arg2); extern bool oidne(Oid arg1, Oid arg2); extern bool oid8eq(Oid arg1[], Oid arg2[]); +extern bool oid8lt(Oid arg1[], Oid arg2[]); +extern bool oid8le(Oid arg1[], Oid arg2[]); +extern bool oid8ge(Oid arg1[], Oid arg2[]); +extern bool oid8gt(Oid arg1[], Oid arg2[]); extern bool oideqint4(Oid arg1, int32 arg2); extern bool int4eqoid(int32 arg1, Oid arg2); extern text *oid_text(Oid arg1); @@ -484,7 +489,7 @@ extern bool time_gt(TimeADT *time1, TimeADT *time2); extern bool time_ge(TimeADT *time1, TimeADT *time2); extern int time_cmp(TimeADT *time1, TimeADT *time2); extern TimeADT *datetime_time(DateTime *datetime); -extern int32 int42reltime(int32 timevalue); +extern int32 int4reltime(int32 timevalue); /* like.c */ extern bool namelike(NameData *n, struct varlena * p); diff --git a/src/include/utils/oidcompos.h b/src/include/utils/oidcompos.h deleted file mode 100644 index 5f58d11d52..0000000000 --- a/src/include/utils/oidcompos.h +++ /dev/null @@ -1,52 +0,0 @@ -/*------------------------------------------------------------------------- - * - * oidcompos.h-- - * prototype file for the oid {name,int4} composite type functions. - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: oidcompos.h,v 1.6 1998/04/26 04:09:28 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef OIDCOMPOS_H -#define OIDCOMPOS_H - -/* oidint4.c */ -OidInt4 oidint4in(char *o); -char *oidint4out(OidInt4 o); -bool oidint4lt(OidInt4 o1, OidInt4 o2); -bool oidint4le(OidInt4 o1, OidInt4 o2); -bool oidint4eq(OidInt4 o1, OidInt4 o2); -bool oidint4ge(OidInt4 o1, OidInt4 o2); -bool oidint4gt(OidInt4 o1, OidInt4 o2); -bool oidint4ne(OidInt4 o1, OidInt4 o2); -int oidint4cmp(OidInt4 o1, OidInt4 o2); -OidInt4 mkoidint4(Oid v_oid, uint32 v_int4); - -/* oidint2.c */ -OidInt2 oidint2in(char *o); -char *oidint2out(OidInt2 o); -bool oidint2lt(OidInt2 o1, OidInt2 o2); -bool oidint2le(OidInt2 o1, OidInt2 o2); -bool oidint2eq(OidInt2 o1, OidInt2 o2); -bool oidint2ge(OidInt2 o1, OidInt2 o2); -bool oidint2gt(OidInt2 o1, OidInt2 o2); -bool oidint2ne(OidInt2 o1, OidInt2 o2); -int oidint2cmp(OidInt2 o1, OidInt2 o2); -OidInt2 mkoidint2(Oid v_oid, uint16 v_int2); - -/* oidname.c */ -OidName oidnamein(char *inStr); -char *oidnameout(OidName oidname); -bool oidnamelt(OidName o1, OidName o2); -bool oidnamele(OidName o1, OidName o2); -bool oidnameeq(OidName o1, OidName o2); -bool oidnamene(OidName o1, OidName o2); -bool oidnamege(OidName o1, OidName o2); -bool oidnamegt(OidName o1, OidName o2); -int oidnamecmp(OidName o1, OidName o2); -OidName mkoidname(Oid id, char *name); - -#endif /* OIDCOMPOS_H */ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 8b1d45edb1..edfd5d47b8 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.17 1998/02/26 04:44:09 momjian Exp $ + * $Id: rel.h,v 1.18 1998/08/19 02:04:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -146,12 +146,12 @@ typedef Relation *RelationPtr; /* - * RelationGetRelationId -- + * RelationGetRelid -- * * returns the object id of the relation * */ -#define RelationGetRelationId(relation) ((relation)->rd_id) +#define RelationGetRelid(relation) ((relation)->rd_id) /* * RelationGetFile -- diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 712345614b..add859e5ea 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: syscache.h,v 1.10 1998/02/26 04:44:11 momjian Exp $ + * $Id: syscache.h,v 1.11 1998/08/19 02:04:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,6 +15,8 @@ #include <access/attnum.h> #include <access/htup.h> +#include <storage/buf.h> +#include <utils/rel.h> /* #define CACHEDEBUG *//* turns DEBUG elogs on */ @@ -67,8 +69,7 @@ */ struct cachedesc { - char *name; /* this is Name * so that we can - * initialize it */ + char *name; /* this is Name so that we can initialize it */ int nkeys; int key[4]; int size; /* sizeof(appropriate struct) */ @@ -80,18 +81,18 @@ struct cachedesc extern void zerocaches(void); extern void InitCatalogCache(void); extern HeapTuple -SearchSysCacheTuple(int cacheId, Datum key1, Datum key2, - Datum key3, Datum key4); +SearchSysCacheTupleCopy(int cacheId, + Datum key1, Datum key2, Datum key3, Datum key4); +extern HeapTuple +SearchSysCacheTuple(int cacheId, + Datum key1, Datum key2, Datum key3, Datum key4); extern int32 SearchSysCacheStruct(int cacheId, char *returnStruct, Datum key1, Datum key2, Datum key3, Datum key4); extern void * SearchSysCacheGetAttribute(int cacheId, AttrNumber attributeNumber, - Datum key1, - Datum key2, - Datum key3, - Datum key4); + Datum key1, Datum key2, Datum key3, Datum key4); extern void *TypeDefaultRetrieve(Oid typId); #endif /* SYSCACHE_H */ |
