1996-07-09 02:22:35 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* rel.c
|
1997-09-07 01:04:48 -04:00
|
|
|
* POSTGRES relation descriptor code.
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2000-01-26 00:58:53 -05:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* IDENTIFICATION
|
2000-01-30 23:35:57 -05:00
|
|
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/rel.c,v 1.8 2000/01/31 04:35:52 tgl Exp $
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "postgres.h"
|
|
|
|
|
#include "access/istrat.h"
|
|
|
|
|
|
|
|
|
|
|
1997-09-07 01:04:48 -04:00
|
|
|
/*
|
|
|
|
|
* RelationIsValid is now a macro in rel.h -cim 4/27/91
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2000-01-30 23:35:57 -05:00
|
|
|
* All of the RelationGet...() functions are now macros in rel.h
|
1997-09-07 01:04:48 -04:00
|
|
|
* -mer 3/2/92
|
1996-07-09 02:22:35 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
1999-05-25 12:15:34 -04:00
|
|
|
* RelationSetIndexSupport
|
1997-09-07 01:04:48 -04:00
|
|
|
* Sets index strategy and support info for a relation.
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2000-01-30 23:35:57 -05:00
|
|
|
* This routine saves two pointers -- one to the IndexStrategy, and
|
|
|
|
|
* one to the RegProcs that support the indexed access method.
|
|
|
|
|
*
|
1996-07-09 02:22:35 -04:00
|
|
|
* Note:
|
2000-01-30 23:35:57 -05:00
|
|
|
* Assumes relation descriptor is valid.
|
1997-09-07 01:04:48 -04:00
|
|
|
* Assumes index strategy is valid. Assumes support is valid if non-
|
|
|
|
|
* NULL.
|
1996-07-09 02:22:35 -04:00
|
|
|
*/
|
|
|
|
|
void
|
|
|
|
|
RelationSetIndexSupport(Relation relation,
|
1997-09-07 01:04:48 -04:00
|
|
|
IndexStrategy strategy,
|
1997-09-08 17:56:23 -04:00
|
|
|
RegProcedure *support)
|
1996-07-09 02:22:35 -04:00
|
|
|
{
|
1997-09-07 01:04:48 -04:00
|
|
|
Assert(PointerIsValid(relation));
|
|
|
|
|
Assert(IndexStrategyIsValid(strategy));
|
1996-07-09 02:22:35 -04:00
|
|
|
|
1997-09-07 01:04:48 -04:00
|
|
|
relation->rd_istrat = strategy;
|
|
|
|
|
relation->rd_support = support;
|
|
|
|
|
}
|