/* ----------------------------------------------------------------
 *   FILE
 *	keys.h
 *
 *   DESCRIPTION
 *	prototypes for keys.c.
 *
 *   NOTES
 *	Automatically generated using mkproto
 *
 *   IDENTIFICATION
 *	/usr/local/devel/postgres-4.2-devel/src/backend/planner/RCS/keys.h,v 1.6 1993/11/03 04:12:05 aoki Exp
 * ----------------------------------------------------------------
 */

#ifndef keysIncluded		/* include this file only once */
#define keysIncluded	1

#define INNER 65000
#define OUTER 65001

/*
 *      1. index key
 *              one of:
 *                      attnum
 *                      (attnum arrayindex)
 *      2. path key
 *              (subkey1 ... subkeyN)
 *                      where subkeyI is a var node
 *              note that the 'Keys field is a list of these
 *      3. join key
 *              (outer-subkey inner-subkey)
 *                      where each subkey is a var node
 *      4. sort key
 *              one of:
 *                      SortKey node
 *                      number
 *                      nil
 *              (may also refer to the 'SortKey field of a SortKey node,
 *               which looks exactly like an index key)
 *
 */

extern bool match_indexkey_operand ARGS((LispValue indexkey, Var operand, Rel rel));
extern bool equal_indexkey_var ARGS((LispValue index_key, Var var));
extern LispValue extract_subkey ARGS((JoinKey jk, int which_subkey));
extern bool samekeys ARGS((LispValue keys1, LispValue keys2));
extern Expr matching2_tlvar ARGS((Var var, LispValue tlist, bool (*test)()));
extern LispValue collect_index_pathkeys ARGS((LispValue index_keys, LispValue tlist));
extern bool match_sortkeys_pathkeys ARGS((LispValue relid, LispValue sortkeys, LispValue pathkeys));
extern bool equal_sortkey_pathkey ARGS((LispValue relid, LispValue sortkey, LispValue pathkey));
extern bool valid_sortkeys ARGS((LispValue node));
extern bool valid_numkeys ARGS((LispValue sortkeys));

#endif /* keysIncluded */
