From c1d62bfd00f4d1ea0647e12947ca1de9fea39b33 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 9 Nov 2003 21:30:38 +0000 Subject: Add operator strategy and comparison-value datatype fields to ScanKey. Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me. --- src/backend/utils/init/postinit.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/init/postinit.c') diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 85bfc93c8bc..21e2efdda75 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.127 2003/09/25 06:58:05 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.128 2003/11/09 21:30:37 tgl Exp $ * * *------------------------------------------------------------------------- @@ -26,6 +26,7 @@ #include "catalog/namespace.h" #include "catalog/pg_database.h" #include "catalog/pg_shadow.h" +#include "catalog/pg_type.h" #include "commands/trigger.h" #include "mb/pg_wchar.h" #include "miscadmin.h" @@ -91,8 +92,10 @@ ReverifyMyDatabase(const char *name) */ pgdbrel = heap_openr(DatabaseRelationName, AccessShareLock); - ScanKeyEntryInitialize(&key, 0, Anum_pg_database_datname, - F_NAMEEQ, NameGetDatum(name)); + ScanKeyEntryInitialize(&key, 0, + Anum_pg_database_datname, + BTEqualStrategyNumber, F_NAMEEQ, + NameGetDatum(name), NAMEOID); pgdbscan = heap_beginscan(pgdbrel, SnapshotNow, 1, &key); -- cgit v1.2.3